hi,
i am using IAR Embedded Workbench for C, the target is M16C. i met problems when setting heap/stack size in the project options.
currently, the working setting is: stack = 1920, interrupt stack =
128, data 16 heap = far heap size = data20 heap size = 1024. though i've not yet well unstood what the above really mean, but it works.the problem is, it seems that i can not most of these values. for example, if i change the data 16 heap from 1024 to 2048, i will get an error:
Error[e16]: Segment DATA16_Z (size: 0x59aa align: 0x1) is too long for segment definition. At least 0x372 more bytes needed. The problem occurred while processing the segment placement command "-Z(NEAR)DATA16_I,DATA16_Z,DATA16_N,DATA16_AN", where at the moment of placement the available memory ranges were "CODE:29c8-7fff" Reserved ranges relevant to this placement: 400-b7f CSTACK b80-bff ISTACK c00-13ff DATA16_HEAP 1400-7fff DATA16_I
but i can successfully change the stack from 1920 to 2048.
i heard the M16C gets more than 31k memory, so i feel the error is confusing.
by the way, in the data mode option, if i disable ( uncheck ) the 'Writable constants' check box, i will get another error:
Fatal Error[e72]: Segment DATA16_C must be defined in a segment definition option (-Z, -b or -P)
what this mean? i believe enable the 'Writable constants' is not a good solution.
thanks.
- woody