Pololu P-Star 45K50 Bootloader
Moderator: Benj
- andreeksteen
- Posts: 12
- Joined: Mon Jan 06, 2020 9:55 am
- Has thanked: 4 times
- Been thanked: 10 times
- Contact:
Pololu P-Star 45K50 Bootloader
I need help to setup a third party bootloader in Flowcode 8 for the Pololu P-Star 45K50.
First of all I downloaded the Pololu Bootloader Utility ( https://www.pololu.com/product/3156/resources ) and installed that in my Flowcode 8 Tools folder.
Then I went into compiler options and in the Programmer tab I pointed it to the P-Load application (see picture "Compiler Options")
Since I do not know what to do under the parameters tab I left that as default (see picture "Compiler Options"), but this must be wrong?
When I run the compiler I get an error message, see picture "Compiler Message"
Under device manager the compiler does show see picture "Device Manager"
I have never before tried to setup third party bootloaders since I normally use E-Blocks and Arduino boards that program with the default Flowcode settings.
First of all I downloaded the Pololu Bootloader Utility ( https://www.pololu.com/product/3156/resources ) and installed that in my Flowcode 8 Tools folder.
Then I went into compiler options and in the Programmer tab I pointed it to the P-Load application (see picture "Compiler Options")
Since I do not know what to do under the parameters tab I left that as default (see picture "Compiler Options"), but this must be wrong?
When I run the compiler I get an error message, see picture "Compiler Message"
Under device manager the compiler does show see picture "Device Manager"
I have never before tried to setup third party bootloaders since I normally use E-Blocks and Arduino boards that program with the default Flowcode settings.
- Attachments
-
- Device Manager
- Device manager.jpg (65.54 KiB) Viewed 5532 times
-
- Compiler Options
- Compiler options.jpg (63.21 KiB) Viewed 5532 times
-
- Compiler Message
- Compiler Message.jpg (71.37 KiB) Viewed 5532 times
Andre Eksteen
Biotech Emporium cc
Reg: 2002/104664/23
P O Box 433
Oudtshoorn
South Africa
6620
Biotech Emporium cc
Reg: 2002/104664/23
P O Box 433
Oudtshoorn
South Africa
6620
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Pololu P-Star 45K50 Bootloader
Hello,
The system cannot find the file specified means that it cannot find the p-load.exe application.
The path doesn't seem quite right as it should be inside the Flowcode v8/tools folder.
Try this instead as the path.
$(appdir)tools\Pololu\USB Bootloader Utility\bin\p-load.exe
the Spaces in the USB Bootloader Utility folder might also be causing problems. you could rename the folder to say boot and the path would become.
$(appdir)tools\Pololu\boot\bin\p-load.exe
As for the parameters start with --help and this should detail what is available for you to pass.
The system cannot find the file specified means that it cannot find the p-load.exe application.
The path doesn't seem quite right as it should be inside the Flowcode v8/tools folder.
Try this instead as the path.
$(appdir)tools\Pololu\USB Bootloader Utility\bin\p-load.exe
the Spaces in the USB Bootloader Utility folder might also be causing problems. you could rename the folder to say boot and the path would become.
$(appdir)tools\Pololu\boot\bin\p-load.exe
As for the parameters start with --help and this should detail what is available for you to pass.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- andreeksteen
- Posts: 12
- Joined: Mon Jan 06, 2020 9:55 am
- Has thanked: 4 times
- Been thanked: 10 times
- Contact:
Re: Pololu P-Star 45K50 Bootloader
I tried the options you offered, settling for the second one that you said would be better if I removed the spaces and just use Boot. Now it tells me that the chip is "unknown". Any advice on that?
- Attachments
-
- Unknown Chip
- Unknown Option.jpg (61.34 KiB) Viewed 5521 times
-
- Compiler
- Compiler.jpg (67.25 KiB) Viewed 5521 times
Andre Eksteen
Biotech Emporium cc
Reg: 2002/104664/23
P O Box 433
Oudtshoorn
South Africa
6620
Biotech Emporium cc
Reg: 2002/104664/23
P O Box 433
Oudtshoorn
South Africa
6620
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Pololu P-Star 45K50 Bootloader
Hello,
First change the parameters to --help and that should tell you what you need to provide. Let us know what this says and I can help from there.
I looked through the source code but couldn't find the right part for the command line parameters.
First change the parameters to --help and that should tell you what you need to provide. Let us know what this says and I can help from there.
I looked through the source code but couldn't find the right part for the command line parameters.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- andreeksteen
- Posts: 12
- Joined: Mon Jan 06, 2020 9:55 am
- Has thanked: 4 times
- Been thanked: 10 times
- Contact:
Re: Pololu P-Star 45K50 Bootloader
Hallo Benj,
I changed the parameters to --Help and the attached message is what I got. Is this what you were looking for?
I changed the parameters to --Help and the attached message is what I got. Is this what you were looking for?
- Attachments
-
- Help.jpg (45.69 KiB) Viewed 5490 times
Andre Eksteen
Biotech Emporium cc
Reg: 2002/104664/23
P O Box 433
Oudtshoorn
South Africa
6620
Biotech Emporium cc
Reg: 2002/104664/23
P O Box 433
Oudtshoorn
South Africa
6620
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Pololu P-Star 45K50 Bootloader
Hello,
You've changed the parameters for the compiler not the programmer
Restore the compiler parameters back to default and it should compile again.
I also think it needs to be all lowercase --help.
--h should also work.
You've changed the parameters for the compiler not the programmer
Restore the compiler parameters back to default and it should compile again.
I also think it needs to be all lowercase --help.
--h should also work.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- andreeksteen
- Posts: 12
- Joined: Mon Jan 06, 2020 9:55 am
- Has thanked: 4 times
- Been thanked: 10 times
- Contact:
Re: Pololu P-Star 45K50 Bootloader
Now that is an embarrassing mistake!!! Sorry for that
I did what you said and it came back with 4 examples. Which one do I use and why?
Thank you for all your patience with me!!
I did what you said and it came back with 4 examples. Which one do I use and why?
Thank you for all your patience with me!!
- Attachments
-
- HELP.jpg (51.76 KiB) Viewed 5483 times
Andre Eksteen
Biotech Emporium cc
Reg: 2002/104664/23
P O Box 433
Oudtshoorn
South Africa
6620
Biotech Emporium cc
Reg: 2002/104664/23
P O Box 433
Oudtshoorn
South Africa
6620
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Pololu P-Star 45K50 Bootloader
Hello,
No worries, I've done it myself more than once
It looks like not all the options are shown there but I am guessing from the examples you need something like this for your parameters.
-t p-star -w "$(outdir)$(target).hex"
Try that and see how you get on.
The examples seem to do this.
1) Write a .hex file to the device - probably the one you want.
2) Write an unknown file type to the device, could be something specific to p-star?
3) Write the flash of the device leaving EEPROM untouched with a delay and a restart?
4) Erase the device
No worries, I've done it myself more than once
It looks like not all the options are shown there but I am guessing from the examples you need something like this for your parameters.
-t p-star -w "$(outdir)$(target).hex"
Try that and see how you get on.
The examples seem to do this.
1) Write a .hex file to the device - probably the one you want.
2) Write an unknown file type to the device, could be something specific to p-star?
3) Write the flash of the device leaving EEPROM untouched with a delay and a restart?
4) Erase the device
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- andreeksteen
- Posts: 12
- Joined: Mon Jan 06, 2020 9:55 am
- Has thanked: 4 times
- Been thanked: 10 times
- Contact:
Re: Pololu P-Star 45K50 Bootloader
Hallo,
I used the parameters you suggested: -t p-star -w "$(outdir)$(target).hex"
In Flowcode it looks like its working fine, the LED's on the board flashed when it started the upload, but the program is not running on the board. I have tried and tested this program on both an Arduino Uno R3 and a E-Blocks 2 BL0032-1 and it works fine on those. That tells me there must still be a bug in the bootloader for the Pololu? I attached a screenshot.
Is the message "Do Nothing" in the "Launching the linker/assembler...." correct?
I used the parameters you suggested: -t p-star -w "$(outdir)$(target).hex"
In Flowcode it looks like its working fine, the LED's on the board flashed when it started the upload, but the program is not running on the board. I have tried and tested this program on both an Arduino Uno R3 and a E-Blocks 2 BL0032-1 and it works fine on those. That tells me there must still be a bug in the bootloader for the Pololu? I attached a screenshot.
Is the message "Do Nothing" in the "Launching the linker/assembler...." correct?
- Attachments
-
- HELP.jpg (69.79 KiB) Viewed 5475 times
Andre Eksteen
Biotech Emporium cc
Reg: 2002/104664/23
P O Box 433
Oudtshoorn
South Africa
6620
Biotech Emporium cc
Reg: 2002/104664/23
P O Box 433
Oudtshoorn
South Africa
6620
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Pololu P-Star 45K50 Bootloader
Looks like you're nearly there now.
Have you checked the board is in bootloader mode?
https://www.pololu.com/docs/0J62/5.2
According to this you also need to use the XC8 code offset parameter to shift the start of your code to avoid the existing bootloader.
https://www.pololu.com/docs/0J62/5.3
I've edited the compiler batch file to do this for you,
Simply copy the attached file into this directory "C:\Program Files (x86)\Flowcode\Common\Compilers\pic\batch", you might want to backup the existing file so you can go back if/when needed.
The linker should be set to donothing, this is correct. Some compiler toolchains require a linker but PIC does not.
Fingers crossed.
Have you checked the board is in bootloader mode?
https://www.pololu.com/docs/0J62/5.2
According to this you also need to use the XC8 code offset parameter to shift the start of your code to avoid the existing bootloader.
https://www.pololu.com/docs/0J62/5.3
I've edited the compiler batch file to do this for you,
Simply copy the attached file into this directory "C:\Program Files (x86)\Flowcode\Common\Compilers\pic\batch", you might want to backup the existing file so you can go back if/when needed.
The linker should be set to donothing, this is correct. Some compiler toolchains require a linker but PIC does not.
Fingers crossed.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- andreeksteen
- Posts: 12
- Joined: Mon Jan 06, 2020 9:55 am
- Has thanked: 4 times
- Been thanked: 10 times
- Contact:
Re: Pololu P-Star 45K50 Bootloader
Hallo,
I have done as you told me and then tried it again, twice, and both times this message came up.
I have done as you told me and then tried it again, twice, and both times this message came up.
- Attachments
-
- HELP.jpg (52.39 KiB) Viewed 5462 times
Andre Eksteen
Biotech Emporium cc
Reg: 2002/104664/23
P O Box 433
Oudtshoorn
South Africa
6620
Biotech Emporium cc
Reg: 2002/104664/23
P O Box 433
Oudtshoorn
South Africa
6620
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Pololu P-Star 45K50 Bootloader
Sorry I got the batch file slightly wrong,
I've now fixed it and re-uploaded.
I've now fixed it and re-uploaded.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- andreeksteen
- Posts: 12
- Joined: Mon Jan 06, 2020 9:55 am
- Has thanked: 4 times
- Been thanked: 10 times
- Contact:
Re: Pololu P-Star 45K50 Bootloader
Hallo,
Thank you SO-SO much for all your help. It now works perfectly, you are a star!!
For anyone having issues with the Pololu P-Star Bootloader in Flowcode, here is a short summary of what Benj told me to do to get it working:
1: Install P-Load bootloader in your Flowcode8/Tools folder and rename it to "Boot" instead of the default "USB Bootloader Utility" : https://www.pololu.com/product/3156/resources
2: Under Compiler options - Programmer - Location paste the following code: $(appdir)tools\Pololu\boot\bin\p-load.exe
3: Under the Parameters Tab paste the following code: -t p-star -w "$(outdir)$(target).hex"
4: Go to "C:\Program Files (x86)\Flowcode\Common\Compilers\pic\batch" and save the existing file as a backup. Now insert the new batch file attached to this post.
You should now be able to program all the Pololu P-Star as well as A-Star boards.
Once again thanks to Benj for all his help and patience.
Thank you SO-SO much for all your help. It now works perfectly, you are a star!!
For anyone having issues with the Pololu P-Star Bootloader in Flowcode, here is a short summary of what Benj told me to do to get it working:
1: Install P-Load bootloader in your Flowcode8/Tools folder and rename it to "Boot" instead of the default "USB Bootloader Utility" : https://www.pololu.com/product/3156/resources
2: Under Compiler options - Programmer - Location paste the following code: $(appdir)tools\Pololu\boot\bin\p-load.exe
3: Under the Parameters Tab paste the following code: -t p-star -w "$(outdir)$(target).hex"
4: Go to "C:\Program Files (x86)\Flowcode\Common\Compilers\pic\batch" and save the existing file as a backup. Now insert the new batch file attached to this post.
You should now be able to program all the Pololu P-Star as well as A-Star boards.
Once again thanks to Benj for all his help and patience.
- Attachments
-
- pic_xc8_comp.bat
- New batch file by Benj
- (278 Bytes) Downloaded 139 times
-
- Compiler setup
- Compiler Options.jpg (44.01 KiB) Viewed 5455 times
Andre Eksteen
Biotech Emporium cc
Reg: 2002/104664/23
P O Box 433
Oudtshoorn
South Africa
6620
Biotech Emporium cc
Reg: 2002/104664/23
P O Box 433
Oudtshoorn
South Africa
6620