problem using bootloader with RTX application | at91sam7x256

Discussion about SAM7 Series and ARM7TDMI based products.

Moderator: nferre

Posts: 7
Joined: Wed Oct 08, 2014 11:22 am

problem using bootloader with RTX application | at91sam7x256

Sat Dec 19, 2015 1:29 pm

I read a lot across the web but i couldn't solve my problem using my bootloader and my RTX application on at91sam7x256.
So i try to simplify my projects and these was the results:
simple bootloader which just a jump to a none RTX app works Fine
but when i use bootloader witha an simple RTX application it get freeze in os_sys_init() function;

The simple bootloader

Code: Select all

#define APPL_START_ADDR 0x00109D00
int main(){
	void (*init_app)(void) = (void(*)(void))APPL_START_ADDR;
//	AT91F_WDTRestart(WatchdogCtrl);

	//Disable the Interrupts
	//Undo the Remap (Set iFlash to Boot Memory)

	//Do a Reset that the Exception Vectors in the Application are correctly written into RAM and the Remap is done correct
	pRSTC->RSTC_RCR = 0xA5000000 | AT91C_RSTC_EXTRST;
	/* Wait for hardware reset */
	while (!(pRSTC->RSTC_RSR & AT91C_RSTC_NRSTL));
Simple RTX App

Code: Select all

#include <AT91SAM7X256.H>
#include "rtl.h"

__task void init  (void);
__task void task1 (void);

OS_TID task1ID;

int main(){
	int i = 0;	
	os_sys_init(init);//Application hang, inside this function

__task void init  (void){
	task1ID = os_tsk_create(task1,1);

__task void task1 (void){
	int i = 0;
	while (1){//infinite loop
Bootloader Target Configuration:
IROM1: 0x100000 | 0x9D00
IRAM1: 0x200058 | 0xFFA8

RTX App Target Configuration:
IROM1: 0x109D00 | 0x36300
IRAM1: 0x200040 | 0xFFC0
Any idea? It is really frustrating not getting the expected behaviour. Please Help!

Return to “SAM7 ARM7TDMI MCU”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest