Commit Graph

2872 Commits

Author SHA1 Message Date
Manuel Bl
ffe8ddfca2 stm32l4: Use USB_OTG_FS_BASE instead of OTG_FS_BASE
Use the standard definition name, so that all standard shared code for
this peripheral works.

Reviewed-by: Karl Palsson <karlp@tweak.net.au>
2020-11-28 22:13:25 +00:00
Manuel Bl
e9c94760e6 stm32l4: enable USB OTG driver 2020-11-28 22:13:25 +00:00
Karl Palsson
76c0a8c289 stm32: rcc: convert to use new standard defines 2020-11-28 22:13:25 +00:00
Karl Palsson
c7d7a18dd7 stm32: rcc: Standardize prescaler define names
We did have
* _HPRE_SYSCLK_DIVN (3 parts)
* _HPRE_DIVN (5 parts)
* _HPRE_DIV_N (4 parts)

Unify all on _HPRE_DIVN.  Provide deprecated definitions to not break
everything at once.

Also, standardize on "NODIV" instead of DIVNONE.
2020-11-28 22:13:25 +00:00
Karl Palsson
43b3fa5ddc stm32l0/l1: flash: support half page flashing
Tested on L1 and L0 using the "dapboot" project, see
https://github.com/devanlai/dapboot/pull/27 for L1
and
https://github.com/devanlai/dapboot/pull/30 for L0
2020-11-28 22:13:25 +00:00
Karl Palsson
b88196f807 ld: support ".ramtext" section hook to place functions in ram
We already had the hooks for ccmram and ram1 and ram2 and ram3 and xsram
for "other" ram sections, but there was no method, out of the box, for
placing a function in "normal" ram.  The "easy" method of labelling a
function as ".data.someramfunc" causes warnings because code isn't meant
to have a name like ".data*" so we must explicitly add a new code
section.

Signed-off-by: Karl Palsson <karlp@tweak.net.au>
2020-11-28 22:13:25 +00:00
Karl Palsson
54319107b0 ld: support ".noinit*" uninitialized ram section
Add support for a section(s) ".noinit*" that will be allocated in ram,
but not cleared or initialized.  This can be used for passing variables
between a bootloader and an app for instance, or even just between
restarts of your application.

Without any assigned usages of the section, there is zero change in ram
usage.  The align does nothing when the prior section was already
aligned.
2020-11-28 22:13:25 +00:00
Karl Palsson
1acfa1c917 stm32l1: desig: handle flash size footnotes from refman
Some of the chipid variants have some footnotes on reading the flash
size register, make sure we report things nicely.
2020-11-28 22:13:25 +00:00
Karl Palsson
636918732d stm32: i2c: drop useless integer defines I2C_CR2_FREQ_
These defines were simply a word containing the number, instead of the
number itself.  This provides no value, and implies that there's a
limited set of values.  The list was _already_ incomplete, so
misleading, _and_ just noise to maintain.  Burn it all.

(well, burn it just a little bit, provide deprecated aliases on the old
values so that code keeps compiling)
2020-11-28 22:13:25 +00:00
Karl Palsson
e15071dbf8 BREAKING: drop all part specific ld files
We were never going to be capable of supporting every single part
variant with their own files, so stop trying.  We've been supporting the
linker script generator for a long time now, so move on from these old
static files.

Breaking: if you were using one of these, and don't wish to use the
linker script generator, you should simply declare a stub linker script,
and include the generic section definitions file, and provide this in
your own application.

Old:
LDSCRIPT = $(OPENCM3_DIR)/lib/stm32/l1/stm32l15xxb.ld

New (linker script generator):

DEVICE=stm32l151cb

New (manual):

* Add file mymemorymap.ld, with contents similar too:
```
MEMORY
{
       rom (rx) : ORIGIN = 0x08000000, LENGTH = 256K
       ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K
}

/* Include the common ld script. */
INCLUDE cortex-m-generic.ld
```

LDSCRIPT=mymemorymap.ld

See ld/README for more information on using the linker script generator
2020-11-28 22:13:25 +00:00
Karl Palsson
fd3c950b29 tests: gadget0: switch to Linker script generation
We're about to drop the very limited set of fixed linker scripts we
have, so convert all the in tree code to linker script generation
2020-11-28 22:13:25 +00:00
Karl Palsson
9ae81c798a README: description of website 2020-11-28 22:13:11 +00:00
Karl Palsson
33c0a1d914 README: explain versioning goals 2020-11-28 22:13:03 +00:00
Dima Barsky
08c5f2a1fb stm32: i2c-v1: Fixed a typo in i2c_read7_v1 and i2c_write7_v1
Replaced & with &&
Wait for all three bits to be set - SB, MSL, and BUSY.

Old code worked by chance, use booleans to correctly convey intent.
Reviewed-by: Karl Palsson <karlp@tweak.net.au>
2020-10-16 12:00:20 +00:00
Karl Palsson
946c1cbc48 jenkins: try no parallelism
clutching at straws to try and eliminate incomprehensible build failures
:(
2020-10-11 13:02:43 +00:00
Fabio Pugliese Ornellas
d60d7802fd Make GENHDR build faster 2020-10-07 22:02:39 +00:00
Diego Herranz
d7ec88c4ea Small README changes
- Use libopencm3-template instead of libopencm3-examples as reference
on how to include libopencm3 to your project.
- Sourceforge website removed since it's only used for the mailing lists
which are listed immediately above.
- Small fixes
2020-10-07 22:00:10 +00:00
Karl Palsson
5dc9dfac79 stm32h7: add dispatch for enabling FPU
Fixes: https://github.com/libopencm3/libopencm3/issues/1217
2020-10-07 21:41:53 +00:00
Karl Palsson
5617ed4664 jenkins: reduce parallel, add verbose
V=s is openwrt, V=1 is here.
try and avoid weird problems with missing files like,
make[1]: *** No rule to make target '../../../include/libopencm3/stm32/g4/pwr.h', needed by 'rcc_common_all.o'.  Stop.

by turning down the paralellism a bit, it's a quad core arm, but it's
stil a little small machine.
2020-09-27 13:47:08 +00:00
Karl Palsson
10b63667b5 jenkins: publish github status always first
need a result first, before we (potentially fail) to publish tests
2020-09-27 13:44:38 +00:00
Karl Palsson
b8461da137 jenkins: attempt to mark commit status only within libopencm3
trying to get pr checks tto flag properly
2020-09-27 13:34:37 +00:00
Karl Palsson
09bf6e9ebc jenkins: fix typo 2020-09-26 21:48:51 +00:00
Karl Palsson
11d2408289 jenkins: try and set commit status on correct commit
Logs on jenkins showed it trying to set the commit state on the wrong
commits, the master of upstream, instead of the head of the PR
2020-09-26 21:41:12 +00:00
Karl Palsson
52dc1ff6d7 Update jenkinsfile after testing by edits live on jenkins 2020-09-10 21:19:55 +00:00
Karl Palsson
04dd4c6fc8 try out other ways.. 2020-09-10 21:19:55 +00:00
Karl Palsson
3416f55ee9 jenkins hatr 2020-09-10 21:19:55 +00:00
Karl Palsson
d220e1daf6 fix syntax in jenkinsfile 2020-09-10 21:19:55 +00:00
Karl Palsson
efc4f08267 tests: gadget0-f3: allow custom local stlink 2020-09-10 21:19:55 +00:00
Karl Palsson
96953eeab3 draft jenkins file 2020-09-10 21:19:55 +00:00
Karl Palsson
bcd162c49a trya nd make directories per 2020-09-10 21:19:55 +00:00
Karl Palsson
5275a1761f hacky hacks 2020-09-10 21:19:55 +00:00
Karl Palsson
0bb9d882cc tests: gadget-zero: add xunit reporting
This is intended to help produce CI reporting on PRs and regression
testing.
2020-09-10 21:19:55 +00:00
rma-x
24bef9c49e stm32:adc: Change bitwise AND to logical AND
The original bitwise AND was _functionally_ correct because all operands
were booleans, but it was very poor at conveying the intent.

Fixes #1230
2020-07-03 12:27:44 +00:00
Michael Drake
90753950bb stm32f3: Enable support for GPIO ports G and H 2020-04-30 08:29:08 +01:00
Michael Drake
07bd38b814 stm32f3: Add GPIO ports G and H to memory map 2020-04-30 08:29:06 +01:00
Guillaume Revaillot
e2299f14f2 devices.data: add stm32g030x6 and x8 chips 2020-04-24 10:25:33 +02:00
Chuck McManis
2ce5cc58ce STM32F4: Add FMPI2C1 Peripheral to the memory map 2020-04-15 12:07:48 +00:00
Chuck McManis
3ee9710f35 STM32F4: I2C Noise Filter Register 2020-04-15 12:07:45 +00:00
Karl Palsson
503cebab87 stm32g4: turn on FPU in pre_main
Yep, all M4F need this file added.
2020-04-10 14:12:08 +00:00
Karl Palsson
418b609230 devices.data: stm32g4: _actually_ finish adding
Missed the CCM, missed the chain heads for the family itself.
2020-04-10 13:44:04 +00:00
Guillaume Revaillot
9bf6ce8b64 stm32g0: flash: add erase/program stuff
probably can be refactored with other chips, did not really looked yet.
2020-04-09 23:37:38 +00:00
Guillaume Revaillot
dc98e2e6d9 stm32g0: flash: fix flash keys. 2020-04-09 23:37:38 +00:00
Guillaume Revaillot
7cb7d51273 stm32g0: flash: update registers documentation 2020-04-09 23:37:38 +00:00
Guillaume Revaillot
d696e2c264 stm32g0: add device electronic signature offsets and build desig. 2020-04-09 23:37:38 +00:00
Guillaume Revaillot
2d9c01867f stm32g0: update sysconfig based on latest stm32g0x1 RM
add pin clamping diode control, available on g041 and g031
2020-04-09 23:37:38 +00:00
Karl Palsson
4e70d06d63 stm32g4: Add basic support
* memorymap
* vectors
* rcc
* gpios
* makefiles
* devices for linker script generation
* doc structure
2020-04-09 23:29:00 +00:00
Karl Palsson
57373b3413 stm32l4: rcc: fix bit error in BDCR
And add the new bit from later ref manuals
2020-04-09 22:04:49 +00:00
Kevin Stefanik
89e90e0e5d pac55xx: gpio: fix gpio_set_af for pin alternate function settings.
register bits were not cleared before setting. refactored to be similar
to how the drive strength register is being set.
2020-04-09 14:17:27 +00:00
Guillaume Revaillot
abc74fd78b stm32g0: fix typos in rcc.h 2020-04-08 07:50:14 +02:00
Florian Larysch
f4ec5b9f9b stm32g0: fix RCC enums for UCPD peripherals
The order of the UCPD1 and UCPD2 bits as described by the
rcc_periph_clken and rcc_periph_rst enums is swapped with regard to the
datasheet. Swap them.
2020-04-07 21:37:22 +02:00