I try to use code banking on F124 device. The call to RTX function os_start_system(0); restart the program (without code banking this function start task number 0). Any idea how to solve this problem?
What is your actual problem? Can you provide more information?
The problem is that during program initialize, I initialize RTX OS (by calling to RTX function os_start_system), os_start_system restart the program and by doing so create endless loop.
I know that this problem relate to code banking since without code banking the program work fine. In order to implement code banking I do the following:
1) In Option for Target windows I select Target tab sheet and check Code Banking checkbox, specify 4 Banks and Bank Area from 0x8000 to 0xFFFF.
2) Add L51_BANK.A51 file to the project and define ?B_NBANKS EQU 4 ?B_RTX EQU 1
3) In the file STARTUP.A51, uncomment the lines EXTRN CODE (?B_SWITCH0) CALL ?B_SWITCH0 ; init bank mechanism to code bank 0
4) In the file Rtxsetup.inc, set ?RTX_BANKSWITCHING EQU 1
5) In the Project window specify two source file compile in bank No. 2.
6) Change Hex file format to Hex-386.
Thanks in advance