• AVR Freaks

AnsweredHot!PIC32MZ Bootloader and FreeRTOS

Author
JCelectronique
New Member
  • Total Posts : 5
  • Reward points : 0
  • Joined: 2014/06/18 08:06:44
  • Location: France
  • Status: offline
2019/07/15 08:52:27 (permalink)
0

PIC32MZ Bootloader and FreeRTOS

Hi everybody
it's been several days that I'm looking for and I always stumble on the same thing, load an aplication with a UDP bootloader
 
i have made a custom board with a PIC32MZ2048EMF100 and a LAN8720, ATWINC1500 ....
 
I wrote a program that works very well on this board and uses FreeRTOS (because of ATWINC1500)
but now I've been using a bootloader and that's where I need your help
 
I tried the example programs basic and DMA_led_pattern to train me to bootloader with harmony on pic32 and all is working
I wrote a simple program of LAN8720 management and I generated with harmony a UDP bootloader, I also wrote an application (without FreeRTOS) with the linker generated by harmony and all is working
unified bootloader allows me to upload this application which starts without any problem
 
on the other hand when I add in my application FreeRTOS , the application is uploaded but after application bootloop continuously. the bootloader is still alive
 
I do not know where to look, maybe the linker file, the interrupt vector ... I hope to be understandable (little french lost)
 
Thanks for your help
#1
rjc101
Super Member
  • Total Posts : 108
  • Reward points : 0
  • Joined: 2016/07/08 14:56:34
  • Location: 0
  • Status: offline
Re: PIC32MZ Bootloader and FreeRTOS 2019/07/15 09:20:49 (permalink) ☼ Best Answerby JCelectronique 2019/07/16 08:31:40
5 (2)
I have discovered that when using FreeRTOS and any kind of boot loader on the EFM series, you need to have the ebase address in the linker file a multiple of 0x8000.
e.g.
PROVIDE(_ebase_address = 0x9D008000);

in the linker file of the main application or when you jump to the app it will simply stop or reboot.
#2
JCelectronique
New Member
  • Total Posts : 5
  • Reward points : 0
  • Joined: 2014/06/18 08:06:44
  • Location: France
  • Status: offline
Re: PIC32MZ Bootloader and FreeRTOS 2019/07/15 11:55:13 (permalink)
0
thank you for this track of research, I will try tomorrow
#3
NKurzman
A Guy on the Net
  • Total Posts : 17939
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: PIC32MZ Bootloader and FreeRTOS 2019/07/15 14:39:36 (permalink)
5 (1)
I wonder why that is, But thanks for the Information.
#4
JCelectronique
New Member
  • Total Posts : 5
  • Reward points : 0
  • Joined: 2014/06/18 08:06:44
  • Location: France
  • Status: offline
Re: PIC32MZ Bootloader and FreeRTOS 2019/07/16 08:30:38 (permalink)
5 (1)
actually, a huge thank you to rjc101. I just tested and the application with RTOS update well
if it can help other developer, the only change to be made to the linker file generated by harmony
From:
PROVIDE(_ebase_address = 0x9D001000);
To:
PROVIDE(_ebase_address = 0x9D008000);
 
thanks again
 
#5
Larry.Standage
Super Member
  • Total Posts : 926
  • Reward points : 0
  • Joined: 2011/12/30 09:50:47
  • Location: 0
  • Status: offline
Re: PIC32MZ Bootloader and FreeRTOS 2019/07/19 17:13:15 (permalink)
0
It must be something specific to FreeRTOS, because the EBASE register in the core starts at bit 12. Therefore, 0x9D001000 should work.
 
It might also have something to do with the startup code, especially FreeRTOS'. If the startup code (which would probably start at 0x9D000000) exceeds the 0x1000 length, then the IVT might not be valid. Looking at the mapping of the application with the ELFViewer plugin might help there.
#6
dapeters
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2016/10/10 13:20:36
  • Location: 0
  • Status: offline
Re: PIC32MZ Bootloader and FreeRTOS 2019/10/23 13:51:02 (permalink)
0
I've been working with a bootloader/app for some time now using an older version of MPLAB (4.15).  I recently started playing around with MPLAB v.5.25 and trying out Harmony V3.  I created a simple FreeRTOS app that flashes some LEDs on the control with no problems.  Now, I'm trying to get the FreeRTOS app to load using the bootloader that I've been using for a while now.  I tried changing my linker script to PROVIDE(_ebase_address = 0x9D008000);, but that doesn't seem to work.  Is there any new information that anyone can supply on this issue?
#7
Jump to:
© 2019 APG vNext Commercial Version 4.5