lpx55s69 usb vcom lite example NOT working with Optimize Most setting

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

lpx55s69 usb vcom lite example NOT working with Optimize Most setting

897 次查看
EinHexenMeister
Contributor I

i imported the lpcxpresso55s69_dev_cdc_vcom_lite_bm SDK example project and compiled it in mcuxpresso (comes with optimize "none")
vcom usb port opens fine and echoes chars

text data bss dec hex filename
28420 248 26612 55280 d7f0 lpcxpresso55s69_dev_cdc_vcom_lite_bm.axf

now i changed the global optimization in
project -> properties -> C/C++ build -> settings -> optimizations
to "Optimize Most (-O3)"
the code shrunk by 30 % and the usb vcom port can NOT be opened anymore

text data bss dec hex filename
19804 248 26660 46712 b678 lpcxpresso55s69_dev_cdc_vcom_lite_bm.axf

now i changed the local optimization for file virtual_com.c in
"virtual_com.c" -> properties -> C/C++ build -> settings -> optimizations
to "None (-O0)"
the code got slightly larger, but the usb vcom port opens again and echoes chars

text data bss dec hex filename
21324 248 26660 48232 bc68 lpcxpresso55s69_dev_cdc_vcom_lite_bm.axf

why are the optimization settings NOT checked before the support product "Example Projects" is released, or do i see it wrong ... is there any reason why it should not work with "optimize most" on ???

yes, it might make debugging sometimes difficult with things being optimized out, but i was always able to get the info i needed, maybe in a not so straight way.

i run always with "optimized most" for the reason being that it's always hard to find where the optimization blows my code to pieces later on when all is done.

why not complex bloatware ??? since we have all the giga-bytes and giga-herz available. yes we have lots of memory and speed, but with optimize it's smaller and it's especially faster.

this feels a bit like, yeah the led is on, ship it, jam it out the door and on to the next. sorry for me saying this, sorry

0 项奖励
回复
1 回复

874 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Klaus,

We do not suggest you use any Optimization, we suggest you use  "None(-O0)", because the Optimization leads to issue when you execute the code which has optimized.

 

Hope it can help you

BR

XiangJun Rong

 

0 项奖励
回复