1. 程式人生 > >IAR 編寫程式的程式碼比微控制器的flash大了會出現故障Error[e16] is too long for segment definition

IAR 編寫程式的程式碼比微控制器的flash大了會出現故障Error[e16] is too long for segment definition

Error[e16]: Segment NEAR_ID (size: 0x15 align: 0) is too long for segment definition. At least 0xb more bytes needed. The problem occurred while processing the  
segment placement command "-Z(CODE)TINY_ID,NEAR_ID=_..X_INTVEC_SIZE-_..X_FLASH_END", where at the moment of placement the available memory  
ranges were "CODE:ff6-fff" 
   Reserved ranges relevant to this placement: 
   CODE:34-4b           SWITCH 
   CODE:4c-57           INITTAB 
   CODE:58-ff5          CODE 
   CODE:ff6-fff         NEAR_ID 

Error while running Linker 

解決方法是更改C++/C優化等級到low mediunm 或者是high