tlafleur wrote on Thursday, June 30, 2016:
You might want to start from the compiler preamble setup code that then calls main()
It’s responsible for all the variable init and setting the stack ect. See compiler manual or look at Microchip boot loader code for more info.
~~ _/) _/)
_/) ``` _/) ~~
On Jun 30, 2016, at 9:46 AM, Sergio Vega servegajim@users.sf.net wrote:
Hi, thanks for your answer.
When I jump to app, no task running, nothing happens. For example, if I load thru bootloader an app with this code in main.c works good:
while(1)
{
for(i=0;i<500000;i++);
vParTestToggleLED( 0 );
TxBuff[0]=0xDD;
TxBuff[1]=0xBB;
CAN1TxSendMsg(0x01,TxBuff,2);
}
when I use FreeRTOS in main.c like this, the app is not work after jump, no signal or leds blink.
*vSemaphoreCreateBinary(xBinarySemaphore);
vSemaphoreCreateBinary(xBinarySemaphoreIO);
if( xBinarySemaphore != NULL )
{
xTaskCreate( prvQueueReceiveTask, “LEDtoggle”, 240, ( void )0x22UL, 1,NULL );
xTaskCreate( CAN1RxMsgProcess, “CANHandler”, 240, NULL, 1, NULL );
xTaskCreate( IOProcess, “IOHandler”, 240, NULL, 1, NULL );
/ Start the scheduler so the created tasks start executing. /
vTaskStartScheduler();
}
// Start FreeRTOS scheduler.
vTaskStartScheduler();
while(1);
*
If I load the app with FreeRTOS code, direct thru the programer (removing linker file and adding pragma config), the program works good (no bootloader).
I think that the problem is with memory location, start memory address or RAM distribution, I don’t know.
In your second question, I don’t know what vector table are your talking, maybe I change or maybe not, I am very new with PICs and RTOS. Please let me know what is this and how works.
I am attaching the linker file for Bootloader Program and Application, is the only section that I set memory address.
If you need more information let me know.
Thanks for your help.
Regards!
Attachments:
app_32MX795F512L - LinkerFile.ld (30.2 kB; application/octet-stream)
btl_32MX795F512L_generic - LinkerFile.ld (30.0 kB; application/octet-stream)
jump from bootloader to FreeRTOS app using PIC32
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/freertos/discussion/382005/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/