stm32duino core with System Workbench for bluepill

Development environment specific, Arduino, Eclipse, VS2013,Em::Blocks etc
User avatar
Rick Kimball
Posts: 1014
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: stm32duino core with System Workbench for bluepill

Post by Rick Kimball » Mon Apr 17, 2017 1:20 pm

You probably want '-nostartfiles' instead of '-nostdlib'.

-nostartfiles lets you provide your own startup code but lets you link with the nano.specs libc stuff.

As far as code bloat goes, you need to spend some time with arm-none-eabi-objdump -CS yoursketch.ino.cpp.elf | less to see what is causing your code to bloat.
-rick

ag123
Posts: 742
Joined: Thu Jul 21, 2016 4:24 pm

Re: stm32duino core with System Workbench for bluepill

Post by ag123 » Mon Apr 17, 2017 2:24 pm

i'm thinking that it is possibly better to simply call init() prior to calling main() in start_c(), that would make the code more readable. But in the mean time that constructor 'black magic' works, hence, i'd guess we'd leave it, until it doesn't :D

gcc is interesting, with so many obscure/often ignored features in elf sections
http://www.cs.stevens.edu/~jschauma/810/elf.html
http://refspecs.linuxbase.org/LSB_3.0.0 ... tions.html

Post Reply