PICkit2 / Junebug bootloader, anyone familiar with custom programming?

Status
Not open for further replies.

blueroomelectronics

Well-Known Member
I'd like to have a small program run on the PICkit2 / Junebug using the built in bootloader. After running I'd like to have it reload its original PICkit2 firmware.

It's a very simple routine I need to run, simply a custom EEPROM updater. Once run it's no longer required and I'd like to reload the PICkit2 firmware, so I don't want to disable or destroy the original bootloader program.

I've found Wouter Van Ooijen's site includes details on the bootloader including some C code at the end of the document. I'm simply not familiar enough with C or the USB calls on the PIC (I don't need the USB to function with the program I'm using)

http://www.voti.nl/pickit2faq/index_1.html

Or this thread on Microchips forums. There's PICkit2 to RS232 software.
**broken link removed**
 
Last edited:
For your scenario would you consider the requirement to "press the button while booting" (in order to reset the device and have it re-download it's firmware) an acceptable paradigm? Or are you looking for fully auto-magic?
 
Whether this is very reason microchip PICKIT2 is provided with 2 Nos of EEproms !! whether they had some content at the assembly point??
 
I'm trying to program the 18F2550 internal EEPROM with a calibration value & user name on the Junebug. This will allow for 3.3V support.
The bootloader button on the PICkit2/Junebug allows you to program it to be something else and when you're done it can be a PICkit2 again.

I've installed Xianfan Chens FTDI firmware on a Junebug using this method. Turns the Junebug into a dual FTDI compatible USB to dual RS232 UART. Very cool actually
With this firmware Windows XP will see your Junebug as a pair of COM ports. Opens up possibilities for data loggers etc. And whenever you want just hold down the red button and run the PICkit2 2.40 software and it's a PICkit2 again.
 

Attachments

  • PICKit2DualCDC.zip
    106.7 KB · Views: 245
Sooo... minor mod to the "serial port" code ... no? Something that would sniff the packets as they go by and look for the "BlueRoom" key, which denotes here comes the calibration values, (and user name)

(That's me... 'handwaving' the solution in front of a whiteboard)

Seems too obvious.. what am I missing in the request?
 
It's something like that, in theory it should be pretty straight forward. It's a simple payload, once it runs it serves no other purpose. Hmm I have an idea... Might be very simple, gotta run for my morning Tim Horton's Coffee first.
 
Thanks August, but that file is just the .hex file (it comes with MPLAB & PICkit2 2.4)
What I'm looking for is a way to reprogram the 18F2550 with user firmware, but not damage the bootloader.
 
It's there somewhere

Oops, Wrong Link!

It is there somewhere. I will look again, and post it. I know it is somewhere because I have the zip file downloaded here.


Found it under "unsupported software".

https://ww1.microchip.com/downloads/en/DeviceDoc/FirmwareV2.10.00.zip


Go to the PicKit2 page and then look at:

PICkit 2 Programmer software source code is available **broken link removed**.


Duh, just went the wrong place the first time
 
Last edited:
What about the ASM code samples here:
**broken link removed**

The key is in the linker script to make sure your image starts after the boot loader. Then can use the PK2 software loader to download it. Saw details on here:
http://www.voti.nl/pickit2faq/index_1.html

But you pointed me to all of these.. so I think I must still be missing something (other than my Laptop which is at home so I can't test this Junebug just yet.. (if only work didn't get in the way of hobbies so much) )
 
I'm not trying to program the external EEPROMs, I'm trying to modify the internal EEPROM. Turns out according to the Microchip forums that your program must start at 0x2000 and you set a byte to 0x55 to get it to start.
I'll try it shortly, and Pommies GLCD code.
 
somehow I could not reach the same site. perhaps i signed In last time. the topic was regarding internal EEproms. those 2 nos of 24LC512.
 
This was from the PICkit2 developer
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…