2005-11-02 01:10 AM
link error + memory settings
2011-05-17 01:19 AM
Hello All
I use ST7FMC2N6B6, which is used only on eval boards (my case it is starter kit for ST7FMC2 BLDC motor) It has 32KB of Flash and 1K of RAM (SDIP 56 pins). I compile and get link error *ERROR L1102: Out of allocation space in segment MY_ZRAM at address 0xF9* Can you tell me if MY_ZRAM is a term of ST, Softec or Metrowerks ?? (where do I read about it ??) I use Softec environment, and I had ''local vars'' set from 0x80 to 0xFF I change it to be from 0x80 to 0x17F, and now it linked OK. The problem is that I don't know if it is allowed to change this parameter like this, cause the ZRAM, as I understand, is for ''near'' variables, with addresses up to 0xFF. (Also stack always reside between 0x100 to 0x1FF. Isn't it ?) Any hint ? Thanks Oren2011-05-17 01:19 AM
Hello Oren,
MY_ZRAM is a label created by STVD7 (from ST, used also by Softec). This is also used in MW documentation. You're right, ZRAM stands for zero page RAM (from 0 to 0xFF). Local vars location depends on the memory model you're using: For small (-Ms) and large (-Ml) memory models, locals must be in zero page (from 0x80 to 0xFF). If you want to place locals above 0x100, you must use the extra large (-Mx) model, to be specified in ''C compiler'' tab of the project settings. Usually, it is better to place them above the stack (from 0x200 up). I think the term ''local vars'' is ambiguous in STVD7, it better be ''zero page vars''. There's a lot of explanations in Metrowerks documentation (in Manual Compiler ST7.pdf, section STMicroelectronics ST7 Back End). Best Regards, Vincent