Other Parts Discussed in Thread: HALCOGEN,
Hi,
For a project, the customer needs to reserve some memory space for uninitialized variables.
The linker command file (manually edited) is as follows:
MEMORY
{
VECTORS (X) : origin=0x00000000 length=0x00000020
FLASH0 (RX) : origin=0x00000020 length=0x0005FFE0
STACKS (RW) : origin=0x08000000 length=0x00001500
RAM (RW) : origin=0x08001500 length=0x00006a00
/* USER CODE BEGIN (2) */
RVRAM (RW) : origin=0x08007F00 length=0x00000100
/* USER CODE END */
}
They have reduced the maximum RAM size by 0x100 and created new section RVRAM that is using that memory.
Then, in HALCoGen in RAM tab we’ve specified the RAM length parameter as 0x00007F00 instead of 0x00008000
In theory, it shall reduce RAM section by 0x100.
However, HALCoGen still allocating the whole RAM to section RAM (after taking stack space out, obviously) and they end up with this:
MEMORY
{
VECTORS (X) : origin=0x00000000 length=0x00000020
FLASH0 (RX) : origin=0x00000020 length=0x0005FFE0
STACKS (RW) : origin=0x08000000 length=0x00001500
RAM (RW) : origin=0x08001500 length=0x00006b00
/* USER CODE BEGIN (2) */
RVRAM (RW) : origin=0x08007F00 length=0x00000100
/* USER CODE END */
}
This causes linkage error (as expected) and also means they have to change the linker command file manually each time they regenerate HALCoGen code.
In the HALCoGen DIL file, it has been noticed that while this line has been changed from this:
DRIVER.SYSTEM.VAR.RAM_LENGTH.VALUE=0x00008000
To this:
DRIVER.SYSTEM.VAR.RAM_LENGTH.VALUE=0x00007F00
The following line has stayed the same:
DRIVER.SYSTEM.VAR.RAM_LINK_LENGTH.VALUE=0x00006B00
Rather than change to something like this:
DRIVER.SYSTEM.VAR.RAM_LINK_LENGTH.VALUE=0x00006A00
Is there something that the customer is doing wrong or is it a HALCoGen issue?