I have problems to complie the bootloader proyect for the pic32mx250f128b "not enought memory". Searching in the forum I found the problem is something related with the _Flash_erase, where i need to do some changes, chance to 1024.
The new version of mikroc pro for pic32 have already all those changes but in my case still not working, so i need help to know what is missing. I already checked into the defs files and according the other post the "def" files have the correct data to work.
The next code si the parte of the constante un the current proyecto, as i know this are the changes the proyect needs to have a complete and correcto proyect
//Constants inside the P32MX250F28B.C
const unsigned long __BOOT_FLASH_SIZE = 0x00000BF0;
const unsigned long __FLASH_SIZE = 0x00040000;
// FLASH library legacy constants & requirements
const unsigned int _FLASH_ERASE = 0x0400;
const unsigned int _FLASH_WRITE_LATCH = 0x0080;
const unsigned int __FLASH_ERASE = _FLASH_ERASE;
const unsigned int __FLASH_WRITE_LATCH = _FLASH_WRITE_LATCH;
const unsigned int __FLASH_ERASE_BLOCK = __FLASH_ERASE;
const unsigned int __FLASH_WRITE_BLOCK = __FLASH_WRITE_LATCH;
I hope somebody can help me.
Device: Pic32mx250f128b
MikroC por for pic32
Mikroprog
Thanks
Bootloader pic32mx250f128b
- stefan.filipovic
- mikroElektronika team
- Posts: 1135
- Joined: 18 Dec 2018 10:30
Re: Bootloader pic32mx250f128b
Hi Adrian,
Have you set the EBASE address in the Edit Project window (Ctrl+Shift+E) to 0x9FC00000 (Boot Flash area)?
Kind regards,
Have you set the EBASE address in the Edit Project window (Ctrl+Shift+E) to 0x9FC00000 (Boot Flash area)?
Kind regards,
Stefan Filipović
-
- Posts: 7
- Joined: 25 Jul 2015 16:17
Re: Bootloader pic32mx250f128b
Hello Stefan thanks for the answer.
I did tomorrow that changes and this are the results
With the EBASE addres equal to 0X9D 00 00 00 or 0x9F C0 10 00 I have
"There is not enough ROM space ( Main.c ; UHD_Driver.c , _lib_System_12.c ; Main.c )
If i Set EBASE to 0x9F C0 00 00
"There is not enough ROM space ( Main.c ; UHD_Driver.c , _lib_System_12.c ; Main.c ) and another 40 lines with the same result ibs, USB,Flasch, etc
i'M USIGN mIKROc pro FOR pic32 V4.0.0 SO I think i have the current version.
I did tomorrow that changes and this are the results
With the EBASE addres equal to 0X9D 00 00 00 or 0x9F C0 10 00 I have
"There is not enough ROM space ( Main.c ; UHD_Driver.c , _lib_System_12.c ; Main.c )
If i Set EBASE to 0x9F C0 00 00
"There is not enough ROM space ( Main.c ; UHD_Driver.c , _lib_System_12.c ; Main.c ) and another 40 lines with the same result ibs, USB,Flasch, etc
i'M USIGN mIKROc pro FOR pic32 V4.0.0 SO I think i have the current version.
-
- Posts: 7
- Joined: 25 Jul 2015 16:17
Re: Bootloader pic32mx250f128b
stefan.filipovic wrote: ↑07 Jul 2020 13:24Hi Adrian,
Have you set the EBASE address in the Edit Project window (Ctrl+Shift+E) to 0x9FC00000 (Boot Flash area)?
Kind regards,
Hello Stefan thanks for the answer.
I did tomorrow that changes and this are the results
With the EBASE addres equal to 0X9D 00 00 00 or 0x9F C0 10 00 I have
"There is not enough ROM space ( Main.c ; UHD_Driver.c , _lib_System_12.c ; Main.c )
If i Set EBASE to 0x9F C0 00 00
"There is not enough ROM space ( Main.c ; UHD_Driver.c , _lib_System_12.c ; Main.c ) and another 40 lines with the same result ibs, USB,Flasch, etc
i'M USIGN mIKROc pro FOR pic32 V4.0.0 SO I think i have the current version.
- stefan.filipovic
- mikroElektronika team
- Posts: 1135
- Joined: 18 Dec 2018 10:30
Re: Bootloader pic32mx250f128b
Hi Adrian,
Have you changed anything in the defs, mlk, or USB HID Bootloader project files except the MCU and a configuration in the Edit Project?
If so, I suggest you reinstall the compiler, because it's the easiest way to get it to the default configuration.
With default configuration when you change the MCU device in the bootloader project to PIC32MX250F128B and set EBASE to 0x9FC00000 you should be able to compile the project without errors.
Kind regards,
Have you changed anything in the defs, mlk, or USB HID Bootloader project files except the MCU and a configuration in the Edit Project?
If so, I suggest you reinstall the compiler, because it's the easiest way to get it to the default configuration.
With default configuration when you change the MCU device in the bootloader project to PIC32MX250F128B and set EBASE to 0x9FC00000 you should be able to compile the project without errors.
Kind regards,
Stefan Filipović
-
- Posts: 7
- Joined: 25 Jul 2015 16:17
Re: Bootloader pic32mx250f128b
Hello Stefan good morning.stefan.filipovic wrote: ↑08 Jul 2020 13:38Hi Adrian,
Have you changed anything in the defs, mlk, or USB HID Bootloader project files except the MCU and a configuration in the Edit Project?
If so, I suggest you reinstall the compiler, because it's the easiest way to get it to the default configuration.
With default configuration when you change the MCU device in the bootloader project to PIC32MX250F128B and set EBASE to 0x9FC00000 you should be able to compile the project without errors.
Kind regards,
Thanks for all the support you give me, now i have working the bootloader with the pic32mx250f128b, only some notes.
1.- The solution was like you mentioned : Reinstall the software and set the EBase to 0x9F C0 00 00, after that i could compile the project without problems, also i already tested my microcontroller charging anoher .hex file using the bootloader and is working.
2.- After reinstall the software and before compile the project i checked what was the default value in the EBASE of the microcontroler and for the pi32mx250f128b was 0x9F C0 10 00, with this for my case not works, only with 0x9F C0 00 00, if i try first with the default Ebase i have some problems to compile the project "not enought memory"
So at the end now is working and i happy for that , thanks Stefan.