Arm Mbed OS support forum

No MCU target: Making custom board on STM32L431RC

Hi,
It’s my first time on this forum, hope I don’ t break any rules.
My project had outgrown the tiny F103 MCU and I moved to L431 one.

I’ve created a custom board based on STM32L431RCT6 MCU and realized, that there’s no targets for L431.
As far as I understand, all STM targets are generated using some python script in tools folder, but looks like this script is generating files only for targets used in official STM dev/eval boards and there’s none based on L431xC chips.

So…
I need to create a target. I’m not that deep into assembler and details of booting and mapping memory and so on.

Could anyone here do the job? :slight_smile:
Or, could someone tell me if it is safe enough just to:

  • copy files from STM32L432xC targets (including startup*.S and stm*.ld) TOOLCHAIN* directories,
  • rename files to reflect them belong to L431
  • remove USB from them (HOW???)
  • use resulting target as a parent of my custom target

What issues should I expect, beware, make sure, etc?..

Thank you for any support you could give me on this. I do really wish to stick to mbed os and not just bare FreeRTOS thingy :slight_smile:

Ok, RTFM is the must.

I’ve read quite a bit of documentation and finally managed to generate Pins for custom board using python script.
After fiddling around with TOOLCHAIN files from L433&L432 boards I was able to compile the minimalistic app (derived from blinky).

OTOH, I’m getting some scary errors about bootloader and debug console spits warnings about RW_IRAM1.

Any ideas?

Excerpt from debug output:

Reading symbols from /Users/dennis/Mbed Programs/mbed-os-example-blinky/BUILD/SAILINGCOMPASS_L431RC/ARMC6/mbed-os-example-blinky.elf...
warning: 
Loadable section "RW_IRAM1" outside of ELF segments
done.
0001133:INFO:gdbserver:One client connected!
warning: Loadable section "RW_IRAM1" outside of ELF segments
warning: while parsing target memory map (at line 3): Required element  is missing
0x1fff2f2c in ?? ()

build log:

Building project mbed-os-example-blinky (SAILINGCOMPASS_L431RC, ARMC6)
Scan: mbed-os-example-blinky
Configuration error: Bootloader not supported on this target. ROM start not found in targets.json.
Configuration error: Bootloader not supported on this target. RAM start not found in targets.json.
Link: mbed-os-example-blinky
[Warning] @0,0: L3912W: Option 'legacyalign' is deprecated.
Elf2Bin: mbed-os-example-blinky
| Module               |     .text |   .data |      .bss |
|----------------------|-----------|---------|-----------|
| IMU.o                |   542(+0) |   0(+0) |     0(+0) |
| LCD_PANEL.o          |   556(+0) |   0(+0) |     0(+0) |
| TimeKeeper.o         |   174(+0) |   0(+0) |     0(+0) |
| [lib]/c_w.l          |  4524(+0) |  16(+0) |   348(+0) |
| [lib]/fz_wm.l        |    26(+0) |   0(+0) |     0(+0) |
| [lib]/libcppabi_w.l  |    44(+0) |   0(+0) |     0(+0) |
| anon$$obj.o          |    32(+0) |   0(+0) |  1024(+0) |
| main.o               |  1282(+0) |   0(+0) |   576(+0) |
| mbed-os/cmsis        | 12379(+0) | 168(+0) |  6993(+0) |
| mbed-os/connectivity |   523(+0) |   0(+0) |     0(+0) |
| mbed-os/drivers      |  1172(+0) |   0(+0) |    44(+0) |
| mbed-os/events       |  1500(+0) |   0(+0) |     0(+0) |
| mbed-os/hal          |  2398(+0) |   8(+0) |   114(+0) |
| mbed-os/platform     |  9177(+0) |  64(+0) |   420(+0) |
| mbed-os/rtos         |  1360(+0) |   0(+0) |     8(+0) |
| mbed-os/targets      | 18887(+0) |   9(+0) |  2569(+0) |
| Subtotals            | 54576(+0) | 265(+0) | 12096(+0) |
Total Static RAM memory (data + bss): 12361(+0) bytes
Total Flash memory (text + data): 54841(+0) bytes
Image: BUILD/SAILINGCOMPASS_L431RC/ARMC6/mbed-os-example-blinky.bin

Hi
Maybe you could share a minimal project in out github repo ?
Jerome