Hi everybody,
i have to do a bootloader in order that my customer can upload firmware. I have take a look on the bootloader example, it doesn't use any control of uart send, is it a problem, what happend if there is a transmission error on one byte ?
should i put a checksum control or somthing ?
Thank's.
bootloader
-
- Posts: 8
- Joined: 16 Nov 2023 10:19
bootloader
Last edited by waytec.fr@gmail.com on 16 Nov 2023 18:03, edited 1 time in total.
- IvanJeremic
- mikroElektronika team
- Posts: 316
- Joined: 05 Sep 2022 14:32
Re: bootloader
Hi,
There shouldn't be any issue, the code uses UART but it does not use the available libraries, instead it uses Uart functions built in the code (it maybe called susart or something like that).
Regards,
Ivan.
There shouldn't be any issue, the code uses UART but it does not use the available libraries, instead it uses Uart functions built in the code (it maybe called susart or something like that).
Regards,
Ivan.
-
- Posts: 8
- Joined: 16 Nov 2023 10:19
Re: bootloader
i try to understand how work the bootloader and windows prog, i don't.
In the hex file, the win prog write the data bytes from line 1 to line 7, then jump to line 2558, sometime adds FF , i'm a bit lost
In the hex file, the win prog write the data bytes from line 1 to line 7, then jump to line 2558, sometime adds FF , i'm a bit lost
-
- Posts: 8
- Joined: 16 Nov 2023 10:19
Re: bootloader
i don't understand how the .hex file is structured, how passing from code to .hex ?
-
- Posts: 8
- Joined: 16 Nov 2023 10:19
Re: bootloader
how passing from .hex to prog memory ?
-
- Posts: 8
- Joined: 16 Nov 2023 10:19
Re: bootloader
why do you erase my previous messages ? it is top secret the . hex ?
-
- Posts: 8
- Joined: 16 Nov 2023 10:19
Re: bootloader
oh, i kwowed nothing about bootloader and hex files, now i learned, i'm doing a win parser with visual studio to have bin file,
For securising the transmision, i wish to add a control, i thing doing this as siple as : pc sends a byte, pic resend it, if pc reads byte as it has send, continue, else abort. Do you think it is sufficient to avoid errors ?
For securising the transmision, i wish to add a control, i thing doing this as siple as : pc sends a byte, pic resend it, if pc reads byte as it has send, continue, else abort. Do you think it is sufficient to avoid errors ?
- IvanJeremic
- mikroElektronika team
- Posts: 316
- Joined: 05 Sep 2022 14:32
Re: bootloader
Hi,
The first part of the HEX is basically a pointer tell the MCU where the BOOTLOADER is, everything else is empty that is where your code will go and the final part is the actual BOOTLOADER.
Your posts were not deleted, you just need to have a couple of your first posts approved before you can post freely.
Regards,
Ivan.
The first part of the HEX is basically a pointer tell the MCU where the BOOTLOADER is, everything else is empty that is where your code will go and the final part is the actual BOOTLOADER.
Your posts were not deleted, you just need to have a couple of your first posts approved before you can post freely.
Regards,
Ivan.
-
- Posts: 8
- Joined: 16 Nov 2023 10:19
Re: bootloader
i do a basic win program in visual basic, that follow the needs of the bootloader ; at the reception of "yy", send first byte of bin file, at reception of "xx", send second byte, at reception of "yy", third byte and so on. but don't works. all works fine until 64000 bytes more or less, and then the win app don't receive nothing, and the bootloader is disappeared from pic. i verified, the bin file is well extracted from hex file, so what can be the problem ? trying to upload with mikrobootloader, it works, and seems that it send bytes by bytes from bin file ?
- IvanJeremic
- mikroElektronika team
- Posts: 316
- Joined: 05 Sep 2022 14:32
Re: bootloader
Hi,
Are you using the BOOLOADER example from our compiler for the specific MCU that the BOOTLOADER was made for, or some other MCU?
If you are using it for some other MCU then i can not guarantee that it will work even if you make changes that are specified in the comments of the example code.
Regards,
Ivan.
Are you using the BOOLOADER example from our compiler for the specific MCU that the BOOTLOADER was made for, or some other MCU?
If you are using it for some other MCU then i can not guarantee that it will work even if you make changes that are specified in the comments of the example code.
Regards,
Ivan.
-
- Posts: 8
- Joined: 16 Nov 2023 10:19
Re: bootloader
the bootloader works grea with your win app, but not with mine
To be clear, the win app convert hex file in bin file and send byte to byte to pic, right ?
To be clear, the win app convert hex file in bin file and send byte to byte to pic, right ?
- IvanJeremic
- mikroElektronika team
- Posts: 316
- Joined: 05 Sep 2022 14:32
Re: bootloader
Hi,
Our application does not convert the hex to bin, it just sends the hex file byte to byte to PIC.
Regards,
Ivan.
Our application does not convert the hex to bin, it just sends the hex file byte to byte to PIC.
Regards,
Ivan.