USB HID Bootloader PIC32MX250F128B

General discussion on mikroC PRO for PIC32.
Author
Message
bios85
Posts: 62
Joined: 05 Jan 2014 11:14

USB HID Bootloader PIC32MX250F128B

#1 Post by bios85 » 25 Nov 2015 15:55

Hello everyone, as the object I need to use the PIC32 (PIC32MX250F128B) with bootloader ... I searched the net and found the USB HID Bootloader for PIC32, but there is a guide that explains how to configure .. ... of course I understand that the micro is programmed for the first time with the programmer mikroProg and then use the program "mikroBootloader USB HID.exe" to load the firmware, but what I did not understand what it is I have to change the boot loader code ? In the various firmware I'm going to write, loaded with bootloader, what should I consider? I have to use the directive org0x000 ...?
Can you please help me understand?

I thank everyone in advance
Last edited by bios85 on 01 Dec 2015 12:53, edited 2 times in total.

User avatar
biljana.nedeljkovic
mikroElektronika team
Posts: 1043
Joined: 30 Jun 2015 15:15

Re: USB HID Bootloader PIC32MX270F256D

#2 Post by biljana.nedeljkovic » 26 Nov 2015 15:08

Hello,

follow the path to find the USB HID bootloader example code in the compiler:
"...\Mikroelektronika\mikroC PRO for PIC32\Examples\Other\USB HID Bootloader\Projects\PIC32"

You can see the explanation about it in the beginning of each file in the source. Read the explanation, and refer to the datasheet for your MCU for the information about Memory organization and clock diagrams:
http://ww1.microchip.com/downloads/en/D ... 01168H.pdf

Best regards,
Biljana

bios85
Posts: 62
Joined: 05 Jan 2014 11:14

Re: USB HID Bootloader PIC32MX270F256D

#3 Post by bios85 » 26 Nov 2015 17:17

Hi, I had this figured out .... I was able to start your bootloader code and I use your software to upload my firmware. The problem is that my firmware does not work, however, if I send it to the microcontroller with mikro prog suite works !!! Is there any setting that I do in my code to make it work? you can have a more complete example of bootloader firmware (flashing LED on portb3) to understand how it works?

I enclose the bootloader code and test LEDs that I tried to do me, thanks
Attachments
Test bootloader.rar
(444.3 KiB) Downloaded 304 times

bios85
Posts: 62
Joined: 05 Jan 2014 11:14

Re: USB HID Bootloader PIC32MX270F256D

#4 Post by bios85 » 27 Nov 2015 11:42

Can you help me please? I need this thing !!!

User avatar
biljana.nedeljkovic
mikroElektronika team
Posts: 1043
Joined: 30 Jun 2015 15:15

Re: USB HID Bootloader PIC32MX270F256D

#5 Post by biljana.nedeljkovic » 27 Nov 2015 15:49

Hello,

to load the bootloader firmware you need to use our mikroProg programmer, and mikroProg Suite.
Once the bootloader is in the microcontroller, you will be able to load various hex files from your projects directly without the mikroProg programmer into the microcontroller using the USB HID Bootloader software provided from our website.

Best regards,
Biljana

bios85
Posts: 62
Joined: 05 Jan 2014 11:14

Re: USB HID Bootloader PIC32MX270F256D

#6 Post by bios85 » 27 Nov 2015 16:04

Ok and it did as I had suggested, the firmware is loaded by the bootloader but then it does not work !!! While if the load using mikro prog suit works .... I accidentally change some parameters like Ebase?

bios85
Posts: 62
Joined: 05 Jan 2014 11:14

Re: USB HID Bootloader PIC32MX270F256D

#7 Post by bios85 » 27 Nov 2015 20:12

Good evening everyone, but it is so difficult to provide a working example so you understand how it works? I tried in every way but my hex that load with the bootloader does not work!
I'm too disappointed your assistance, I am not forced to buy more mikroelectronica. In addition to waiting days for an answer, give advice useless, I provided my code as always ask in other posts and have not given even a comment on what might be wrong!
Sorry for the anger, but I do not accept more than to solve a problem with your assistance it takes weeks. I hope for your reply soon, I trust in your professionalism.

bios85
Posts: 62
Joined: 05 Jan 2014 11:14

Re: USB HID Bootloader PIC32MX270F256D

#8 Post by bios85 » 30 Nov 2015 21:37

Hello everyone, I wanted to thank you for the help you have given me !!!!! as usual, no one has responded to my question, and just to be fair, I tell you as well that I contacted via email the administrator biljana.nedeljkovic and guess what? no answer! then I start to think that everything I do not work because the bootloader provided by mikroelectronica not work, otherwise I do not see why they should not give me help. Moreover, there are many discussions on the subject and everyone has problems and does not help anyone year.
so if you need bootloader for PIC32 mikroelectronica not use because you only lose time.

Thanks again

User avatar
biljana.nedeljkovic
mikroElektronika team
Posts: 1043
Joined: 30 Jun 2015 15:15

Re: USB HID Bootloader PIC32MX270F256D

#9 Post by biljana.nedeljkovic » 01 Dec 2015 10:51

Hello,

let me explain again, and in case I didn't understand your problem properly, please let me know.

If you want to load bootloader code into the microcontroller, you need external programmer and our mikroProg Suite software to load the bootloader.
Once the bootloader is inside the microcontroller, then you can be able to load hex files without the programmer, using only our mikroBootloader. It is available in the compiler, go to Tools - USB HID Bootloader.

Please, pay attention that if you set the configuration for your working code in Edit Project, once you load it using the bootloader, those settings will be re-written by the bootloader, so the code won't work. To prevent that, you should define the configuration in the bootloader code, not in your working code.

I apologize for the delay, our office is closed on weekends, so I haven't seen your message.

Kind regards,
Biljana

bios85
Posts: 62
Joined: 05 Jan 2014 11:14

Re: USB HID Bootloader PIC32MX250F128B

#10 Post by bios85 » 01 Dec 2015 13:16

Hello,
then I do a summary of what I did:
1) I took your example of HID Bootloader in the C: \ Users \ Public \ Documents \ Mikroelektronika \ mikroC PRO for PIC32 \ Examples \ Other \ USB HID Bootloader
2) I changed from the Edit Project all necessary parameters for operation for the microcontroller PIC32MX250F128B (I saved the file with Save Scheme from the edit menu project that I enclose below)

3) I've compiled and with the software and hardware mikroProg Suite mikroProg I uploaded the bootloader

4) I created a new project with mikroC PRO for pic 32, simple flashing LEDs on portb.b3, and the menu edit project I did load Scheme PIC32MX250F128B.cfgsch loading the file saved in step 2

5) fill out the project to generate the hex file

6) I open the tool mikroBootloader and restart the microcontroller, just turns red USB symbol link I click on Connect

7) The pic is connected, then click on Browse for HEX and load the hex file from step 5

8) click the button uploading

9) The operation completed successfully, the micro resets itself and starts the boot loader, after 5 seconds nothing happens and the led of course does not blink.

If the hex file created in step 5 by the sending software and hardware mikroProg Suite mikroProg my project function and the LED blinks correctly.

What did I do wrong?

Enclosed is a .rar file with all the files of the project, please, give me a hand to get it working?
Thank you have a nice day
Attachments
Test bootloader.rar
(453.9 KiB) Downloaded 268 times

Toley
Posts: 922
Joined: 03 Sep 2008 16:17

Re: USB HID Bootloader PIC32MX250F128B

#11 Post by Toley » 01 Dec 2015 18:37

Hi bios85, there is a simple thing you can do to determine if it's a bootloader problem or something else.

Program the bootloader on your PIC with mikroProg. Then read back the PIC with mikroprog and save the resulting hex file. After that you just have program your PIC with the bootloader and after read the memory content with mikroprog and compare with previous result.

You will see if the bootloader firmware did program something. If yes then the bootloader is probably ok. You will have to look at your config fuses to be the same on the bootloader and on your program.
Serge T.
Learning is an endeless process but it must start somewhere!

User avatar
biljana.nedeljkovic
mikroElektronika team
Posts: 1043
Joined: 30 Jun 2015 15:15

Re: USB HID Bootloader PIC32MX250F128B

#12 Post by biljana.nedeljkovic » 02 Dec 2015 16:02

Hello,

you can try to test the bootloader code the way Toley suggested.

Please try the simple LED blinking from our examples folder, so that you only have one source file.
Unfortunately, I don't have the same microcontroller to be able to fully reproduce the same behavior as you have, but the procedure you described is correct in the matter of programming order.

You mentioned earlier that you changed some parameters, can you try to explain which ones, and get back to default values?

Also, please consult with the datasheet and double check your configuration settings.

Best regards,
Biljana

bios85
Posts: 62
Joined: 05 Jan 2014 11:14

Re: USB HID Bootloader PIC32MX250F128B

#13 Post by bios85 » 03 Dec 2015 10:35

Hi, I did the tests that you have asked me but without obtaining a result! I took the bootloader from the folder as edit project and changed in the device by selecting the PIC32MX250F128B. After completing I getting the following error:
Image

So I had to change in the parameter edit project EBASE as in the following image:
Image

I also modified, as required in the file config.c, the bootloader size parameter as shown:
Image

After that I loaded the hex file generated with mikroProg device. Then, as you asked me, I open the sample file flashing LED adapting it to my device and using the same config used in bootloader. Compile and load the device the hex file with the program mikrobootloader.
Obviously, when finished, it will not work!
I do not know what else to try, I did the test suggested by Toley and indeed the bootloader writes at the beginning of program memory code flashing LEDs, but then it does not work!

Tips?

bios85
Posts: 62
Joined: 05 Jan 2014 11:14

Re: USB HID Bootloader PIC32MX250F128B

#14 Post by bios85 » 04 Dec 2015 09:36

hi, I wanted to inform you that I have done this test at a PIC32MX270F256D but with the same results! Does not work!
Now I ask you, can you give me the code compiled for one of the two microcontrollers and then I feel on my own hardware?
It is not possible for two micro two bootloader does not work, then you can on this forum no one to run this bootloader so you can help me?

bios85
Posts: 62
Joined: 05 Jan 2014 11:14

Re: USB HID Bootloader PIC32MX250F128B

#15 Post by bios85 » 04 Dec 2015 22:53

as usual then no longer responds! but I have to pay to get the information? what is this forum?
I just do not understand, I feel cheated in a way absurd, lacking seriousness in the strongest terms.
I thought you were serious professionals

Post Reply

Return to “mikroC PRO for PIC32 General”