I followed the instructions in the P-Star docs to setup of MicroCode studio to compile and load to the P-Star. Setup as directed in Sec 11. However, the program is not loaded to the P-star. I can compile, then load from the command prompt, but after compile is complete in Microcode Studio it is not loaded. Any ideas what may be wrong?
I am sorry you are having trouble programming the P-Star 25K50 with PICBASIC PRO.
Could you describe what the yellow, red and green LEDs are doing on the P-Star before you attempt to program it? Also, what entries for the P-Star are visible in your Device Manager?
When you click the “Compile Program” button, do you see the Command Prompt appear? Does it appear briefly or does it stay open? If it stays open, what is the full output you see in that window? What are the three LEDs doing after you attempt to program the P-Star?
Thanks for the reply.
LED’s are Solid Amber and double flash green.
By device manager are you asking about the microcontroller drop down? is shows 18F25K50
The command prompt flashes so quickly, I am not able to see what is happening there.
The LED’s don’t change after attempting to program. However, as mentioned I can compile and then download through the command prompt and then the new program runs. I am able to place the unit back in bootloader mode by shorting VDD and RB6.
Also, Compile Program Drop down shows p-load
I also should mention this unit was purchased in 2015 and I have just pulled it out to use on a project. Could the bootloader code be outdated and not compatible?
The Device Manager is a component of Microsoft Windows that shows you what devices are connected to your computer. However, it sounds like you are able to successfully program the P-Star by running p-load manually from a Command Prompt, so the P-Star itself is working and there is no need to look at the Device Manager.
There has only been one version of the P-Star 25K50 bootloader so I do not expect it to cause compatibility issues. Also, you are saying that p-load is successfully loading your code onto the P-Star, so all we have to do is figure out how to make PICBASIC PRO run the same command that worked for you manually.
Could you carefully double check the command that you configured PICBASIC PRO to run? In particular, please look at the lines at the beginning of
--pause-on-error. There must be two hyphens at the beginning, like this:
(I just noticed that the user’s guide was displaying that part incorrectly.)
This is a copy of what we pasted to the Parameter
-w $hex-filename$ —pause-on-error
Just as I thought, right before the letter
p in the thing you posted there is a single longer dash character instead of two hyphens. It’s a matter of
--. You should delete that dash and type two hyphens, or just copy and paste what I wrote above in my last post.
Not sure why it is displaying that way , but it is a copy and paste of two dashes
When I edit your your earlier post I can see a single long dash instead of two hyphens. You might want to try typing the command again, and if it still does not work, please post a screenshot of the PICBASIC PRO configuration for that command so we can double check it.
Screenshots attached. Thanks
I tried to reproduce your problem here using “MicroCode Studio - PICBASIC PRO - Trial Edition 2017.4.12.0” and I could not: everything worked fine on the first try.
I do not see anything obviously wrong in your screenshots
I still wonder if there are some special characters in the parameters that are causing problems. I recommend deleting the current parameters and then carefully typing this:
--pause -w $hex-filename$
--pause option is first so that p-load will pause if anything goes wrong with processing the arguments that come after it. Also, that option will make p-load pause at the end no matter what, even if there was no error.
With the pause, I can see what is going on.
I see this message in the window when it goes to write Error: Unknown option: ‘Home’.
I am wondering if the space in the path is causing a problem
The path is C:\users\DA Home Office
Not sure if that is coming from p-load.exe or Micro Code Studio. I am thinking the latter where I can manually upload from the command prompt.
It sounds like the spaces in the HEX file path are getting interpreted as argument separators by the IDE. Since there are no double quotes in your path, this might work:
--pause -w "$hex-filename$"
David the quoted
"$hex-filename$" fixed the issue!
Thanks so much for your persistence and assistance!
Also, I believe it is true that the only way to get back into bootloader is the external reset switch is that correct?
I am glad you were able to fix the problem. It is possible to start the bootloader from your application without using external connections. For more information, see the “Getting into bootloader mode” section of the P-Star user’s guide.
Good decision! I hade the same problem with my P-Star, the problem also was easy to solve.
productivity tracker review