[Nix-dev] Cross development for STM32

Alexey Shmalko rasen.dubi at gmail.com
Fri Aug 26 19:28:49 CEST 2016


I usually produce raw binary file first:

$ arm-none-eabi-objcopy -O binary build/ch.elf ch.bin

and then flash that with openocd:

$ openocd -f openocd.cfg
poll
reset halt
flash probe 0
flash write_image erase ch.bin 0x08000000
reset

Note this unlikely to work for you, as your device is probably different.

Check out my Makefile (flash target) and openocd scripts:
- https://github.com/rasendubi/bkernel/blob/master/Makefile#L70-L72
- https://github.com/rasendubi/bkernel/blob/master/openocd.cfg
- https://github.com/rasendubi/bkernel/blob/master/openocd.tcl

On 08/26/2016 03:55 PM, Tim Barbour wrote:
> Thank you Philip and Alexey.
> 
> I have tried gcc-arm-embedded as you suggested, and had no trouble building
> the ChibiOS UART demo for a Maple Mini board (I did have to change GPIOC_LED
> to GPIOB_LED; presumably the demo was written for a board with more LEDs).
> 
> $ file build/ch.elf 
> build/ch.elf: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, not stripped
> 
> $ arm-none-eabi-size build/ch.elf 
>    text    data     bss     dec     hex filename
>    6880     416   20448   27744    6c60 build/ch.elf
> 
> I have yet to figure out how to get the code onto the board. Something like
> connecting to UART1 and starting the boot loader. I also have an stlink
> device, so openocd should work too, if necessary.
> 
> Tim
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160826/a04fda44/attachment.sig>


More information about the nix-dev mailing list