Quantcast
Channel: Reprap Forum - Firmware - Marlin
Viewing all articles
Browse latest Browse all 2831

How can I debug the STM32F103 code and remove compiler optimization (1 reply)

$
0
0
Hi
I'm new to marlin and I want to study it,
I have downloaded the repo and changed the platformio.ini like this

default_envs = STM32F103CB_malyan

Also I have copied the Malyan/M200 Configuration.h and Configuration_adv.h files into the marlin project and could compile the code, I have these questions
How can I disable compiler optimization?
The next step is to remove compiler optimization so the code can be debugged with ease, so I have edited line number 798 in the main makefile
from OPT = s to OPT = 0
And I expected the output flash size to change, But noting would change, so Where should I change to remove the compiler optimization,

Also when I hit F5 or start debugging in VScode, I would get this error

Error: Build environment 'simulator_linux_debug' is incompatible with BOARD_MALYAN_M200. Use one of these: STM32F103CB_malyan, STM32F103CB_malyan_maple
where should I change to be able to debug the code, I prefer to use jlink as debugger too.

Regards

Viewing all articles
Browse latest Browse all 2831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>