Migrating to Version 2.6
Posted: 17 September 2008, 18:14 PM
I have migrated my native mode application to the new release. This is a non-trivial application with 6 tasks (including main).
First thing I found was that the code would no longer link. I specify the size of the stack for the main task and so the heap was now defaulting to 512 bytes. The remedy is to add the following line:Out of 4K RAM I have 70 bytes left. I can tell this by using the following:which fails with the message
The code size grew from 19184 bytes to 19242 bytes. It would appear that this is due entirely to code changes with zxLib.
On investigation of the source code to see what had changed I noticed several cleanup items:
1. Double casts are removed (uint16_t)(uint16_t) becomes (uint16_t)
2. The order of generation has changed so that for example all static function declarations are first
3. Instead of declaring byte data for word and dword arrays, the proper type is used instead.
First thing I found was that the code would no longer link. I specify the size of the stack for the main task and so the heap was now defaulting to 512 bytes. The remedy is to add the following line:
Code: Select all
Option HeapReserve 128
Code: Select all
Option HeapReserve 199
Code: Select all
Error: statically allocated variables plus the specified main task stack size and the heap reserve (199) exceeds the available RAM (4096)
On investigation of the source code to see what had changed I noticed several cleanup items:
1. Double casts are removed (uint16_t)(uint16_t) becomes (uint16_t)
2. The order of generation has changed so that for example all static function declarations are first
3. Instead of declaring byte data for word and dword arrays, the proper type is used instead.