memory problem ez430 F2013

hello everybody :slight_smile:

i have a little problem with IAR for building my application,

when i have this following error , i decrease the size of the stack (in options => general => stack/heap) and it works

(hoping no “stack overflows”)

" 1 826 bytes of CODE memory

68 bytes of CONST memory (+ 4 bytes shared)

79 bytes of DATA memory (+ 19 bytes shared)

Errors: none

Warnings: none

Linking

xlink.exe D:\IAR_project\Debug\Obj\main.r43 -o D:\IAR_project\Debug\Exe\test_I2C.d43 -ID:\IAR\430\LIB\ -f D:\IAR\430\

CONFIG\lnk430F2013.xcl -D_STACK_SIZE=64 -rt D:\IAR\430\LIB\CLIB\cl430f.r43 -D_HEAP_SIZE=0 -s __program_start

Error[e16]: Segment CSTACK (size: 0x64 align: 0x1) is too long for segment definition. At least 0x33 more bytes needed.

The problem occurred while processing the segment placement command “-Z(DATA)CSTACK+_STACK_SIZE#”, where

at the moment of placement the available memory ranges were “CODE:24f-280”

Reserved ranges relevant to this placement:

200-243 DATA16_I

244-24e DATA16_Z

24f-280 CSTACK

Build aborted. "

But i have nearly the same error now and i do not know what things to change in order to make it work

"

Error[e16]: Segment DATA16_ID (size: 0x44 align: 0x1) is too long for segment definition. At least 0x14 more bytes

needed. The problem occurred while processing the segment placement command

“-Z(CONST)DATA16_C,DATA16_ID,DIFUNCT,CHECKSUM=F800-FFDF”, where at the moment of placement the

available memory ranges were “CODE:ffb0-ffdf”

Reserved ranges relevant to this placement:

f800-f82f CSTART

f830-ffaf CODE

ffb0-ffdf DATA16_ID

Build aborted. "

Do you think that my application is too big ???

Do i have to change the memory map (if i could) ??

thank you in advance for any piece of advice :slight_smile:

baze

Your linker script is here - take a look at this file using Notepad:

D:\IAR\430\CONFIG\lnk430F2013.xcl

Your commandline also is requesting a stack size of 64. This seems reasonable, but could be cut in half if needed.

Thank you, it helps me to understand :slight_smile:

i tried to modify the map but it seems to dislike my changes …

i’ll keep on …