How to change FreeRTOS from ATMEGA323 to 128

Dear Sir/Madame I just bought one Atmega128 evaluation board and I want to load the FreeRTOS5.11 to this board but I have a problem with demo for ATMEGA323 like this. When I use IAR to open the demo project in ATMEGA323 and then I complile the source code. It is working well but when I plugged JTAGmkII to board for debuging and IAR inform "The stack plug-in failed to set a break point on "main". The stack window will not be able to display stack content (you can change this setting in Tools->Options dialog box) ". Could you pleased show me why this error happen? I also the change the configuration to ATMEGA128 by changing the library to iom128.h and change atmega device in option of project and I debug with JTAGmkII but It is not working too. When I debugged, it always inform the stack pointer is outside. This is the first time, I try with OS. Could you give me a help? Thank you so much. Best regards Toan Thieu

How to change FreeRTOS from ATMEGA323 to 128

IAR expects the stack pointer to be within the stack region setup by the linker script. This is only the case until FreeRTOS is started. When tasks are running the stack pointer will point to the task stack which is allocated from the heap, so IAR things there is a problem when there isn’t. Either turn the warning off or ignore it.

How to change FreeRTOS from ATMEGA323 to 128

Hi Davedoors Thank a lot. I just read "How to make demo work on AVR Atmega128" in the forum and do the same thing but only my frequency system is 8Mhz but the device is still not working. Could you tell me that we need to change anything for running on ATMEGA128 when we complied on ATMEGA128? Thank you Toan Thieu