You need to edit the platform.txt file and add the “-S” directive to C and/or CPP flags.
It may be that you have to remove some other compiler directive in order to get this work.
compiler.cpp.flags=-c -g -Os -S {compiler.warning_flags} -MMD -ffunction-sections -fdata-sections -nostdlib –param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_{build.variant} -D{build.vect} -DERROR_LED_PORT={build.error_led_port} -DERROR_LED_PIN={build.error_led_pin}
and get this error message:
Arduino: 1.6.13 (Windows 10), Board: “Generic STM32F103C series, STM32F103CB (20k RAM. 128k Flash), Serial”
In file included from C:\Users\Octa\Documents\Arduino\OCTA5\OCTA5.ino:2:0:
C:\Users\Octa\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\FastLED-stm32f103/FastLED.h:17:21: note: #pragma message: FastLED version 3.001.005
# pragma message “FastLED version 3.001.005”
^
c:/users/octa/appdata/local/arduino15/packages/rfduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe:sketch\OCTA5.ino.cpp.o: file format not recognized; treating as linker script
c:/users/octa/appdata/local/arduino15/packages/rfduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe:sketch\OCTA5.ino.cpp.o:1: syntax error
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Generic STM32F103C series.
This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.
$ ~/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-objdump -CS /tmp/arduino_build_224002/BlinkWithoutDelay.ino.elf | less
that is the linux version .. change paths for windows
because i have no idea.
i will try it later,when i know where are the paths for windows.
c:\users\octa\appdata\local\arduino15\packages\rfduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\bin\arm-none-eabi-objdump.exe
appdata is a hidden directory,but i found the files and it works.
Depending on your version of the Arduino IDE, its either in appdata local or appdata roaming.
I think you can use %APPDATA%\local\arduino15\ …..etc…etc. on the newer versions of Arduino
Objdump is a good solution, but you will lose valuable information, such as labels etc. If you decide to use objdump, remember to use the -d option with the elf file (you can find it at the build directory), or the -D -b binary options with the final firmware.
If I were you I would change the recipe.c.o.pattern and recipe.cpp.o.pattern variables to include 2 commands, one for generating the assembly and one for the object file. I think you can use the ‘&’ symbol to concat to commands in a single line under windows, so I believe you could do something like:
recipe.cpp.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} ... -o "{object_file}" & "{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -S ... -o "{object_file}.s"