Hi Kian,
Modification of the bootloader from SD card to a USB stick should be a simple task.
Just follow the USB HOST sample project to get yourself familiar with the usage of FAT32 and the USB stick.
Now, change the access reading functions from Sd card to the USB.
Generaly thats all ( you will of course move some logic to the USB service routine, but it should not be too complicated task).
Take care as well about the code size since if it will span more flash pages than mine then you will have also to modify the adresses locations
of the user application ( otherwise your user application will destroy the bootloader code...)
Wish you luck and see your project in Libstock.
Hooper.
SD booloder for debug
Re: SD booloder for debug
Hi Kian,
I have not noticed that your target
I might assume that the general program structure should be the same
But you have to take care about the address space issues.
I have not noticed that your target
I might assume that the general program structure should be the same
But you have to take care about the address space issues.
Re: SD booloder for debug
Is it actally possible to edit the topic of this post? I just noticed its booloder instead of bootloader.
Re: SD booloder for debug
Not sure if it is possiblefeuerwolf wrote:Is it actally possible to edit the topic of this post? I just noticed its booloder instead of bootloader.
-
- Posts: 53
- Joined: 16 Mar 2017 20:48
Re: SD booloder for debug
Dear Hooper,hooper wrote:Hi Kian,
I have not noticed that your target
I might assume that the general program structure should be the same
But you have to take care about the address space issues.
Very thanks to your comment's,
I'll working on it.
My MCU is STM32F407.
H.Kian
H.Kian
Best Regards
Best Regards
Re: SD booloder for debug
find the CheckSum Checker is now on Libstock as well
https://libstock.mikroe.com/projects/vi ... code-lines
https://libstock.mikroe.com/projects/vi ... code-lines
Re: SD booloder for debug
Hi everybody,
I'm tring to adapt this useful bootloader for the PIC32MX170F256B, but I'm encountering many problems.
The code I have started from, is the following: https://libstock.mikroe.com/projects/vi ... bootloader
I think to have adapted correctly the bootloader, but I'm not able to compile the application to test, because when I set the #pragma orgall, as explained in the previous page of this topic, as well as in the .pdf files attacched to above link,
_________________________________________________
#define USER_APP_RESRT_ADDR 0x09D00A000
#define ConfigMem(); \
OrgAll(USER_APP_RESRT_ADDR); \
FuncOrg(__BootStartUp,USER_APP_RESRT_ADDR);
_________________________________________________
the compiler tell me that there are not enough ROM.....
These are my project settings:
The code is very simple:
I tried also this:
but the problem remains
Without orgall directive the compiler, compiles without problems.....
Can someone help me, please?
Thanks in advance.
yzzo
I'm tring to adapt this useful bootloader for the PIC32MX170F256B, but I'm encountering many problems.
The code I have started from, is the following: https://libstock.mikroe.com/projects/vi ... bootloader
I think to have adapted correctly the bootloader, but I'm not able to compile the application to test, because when I set the #pragma orgall, as explained in the previous page of this topic, as well as in the .pdf files attacched to above link,
_________________________________________________
#define USER_APP_RESRT_ADDR 0x09D00A000
#define ConfigMem(); \
OrgAll(USER_APP_RESRT_ADDR); \
FuncOrg(__BootStartUp,USER_APP_RESRT_ADDR);
_________________________________________________
the compiler tell me that there are not enough ROM.....
These are my project settings:
Code: Select all
DEVCFG3 : $1FC00BF0 : 0x00000000
DEVCFG2 : $1FC00BF4 : 0x00010071
DEVCFG1 : $1FC00BF8 : 0x0354C701
DEVCFG0 : $1FC00BFC : 0x1107FC1B
Code: Select all
//uC: PIC32MX170F256B
//Ck: 48MHz (8MHz - PLL input divider x2, PLL multiplier x24, PLL output divider x2)
#define USER_APP_RESRT_ADDR 0x09D00A000
#define ConfigMem(); \
OrgAll(USER_APP_RESRT_ADDR); \
FuncOrg(__BootStartUp,USER_APP_RESRT_ADDR);
void main() {
ConfigMem();
TRISA.F2 = 0; //LED
TRISA.F4 = 1; //SWITCH
TRISB.F4 = 0; //SW-RST
LATB.F4 = 0; //SW-RST off
DisableInterrupts();
while(1)
{
LATA.F2 = 1;
Delay_ms(2000);
LATA.F2 = 0;
Delay_ms(2000);
}
}
Code: Select all
#pragma orgall 0x9D00A000
#pragma funcorg __BootStartUp 0x9D00A000
Without orgall directive the compiler, compiles without problems.....
Can someone help me, please?
Thanks in advance.
yzzo
- Attachments
-
- Cattura.PNG (11.59 KiB) Viewed 1896 times