Supporting Third Party Programming Tools

From Flowcode Help
Jump to: navigation, search
Gen Compiler Options Programmer PIC.png

Each version of Flowcode comes ready with a default programming tool. However it is fairly easy to change the settings in Flowcode to allow for third party programming tools to be used.


The programming tool that is invoked when the compile to chip button is pressed is configured in the Build menu under Compiler options then click on the Programmer tab page.


For help with third party programming tools the first port of call should be to check our forums to see if anyone else has already tried the programming tool with Flowcode. If you are the first then if you wish you can post your findings for other users to benefit from.


Contents

Warning

Editing the Compiler or Linker tabs of the compiler options will likely stop Flowcode from being able to compile correctly unless you know what you are doing.

The settings below are for the Programmer tab of the compiler options. Take care to ensure you only edit the values in the Programmer tab.

If you do edit the values in the compiler or linker tab then you can simply revert back to the default settings and start again.


Microchip PIC / PIC16 / PIC32

mLoader

mLoader is the default programming software and can be used to talk to the various Matrix hardware including E-blocks, E-blocks2, Formula Flowcode, ECIO, MIAC, ProtoBoard, ProjectBoard...

Location:

$(appdir)tools\mLoader\mLoader.exe

Parameters:

-chip $(chip:u) "$(outdir)$(target).hex"


PPP

PPP is the older programming software from Flowcode v5 and previous and can be used to talk to versions of the E-blocks EB006 up to and including version 8.

Location:

$(appdir)tools\PPP\PPPv3.exe

Parameters:

-cs 2 -chip PIC$(chip:u) -nogui "$(outdir)$(target).hex"


PICkit2

Location:

$(appdir)tools\PICkit2\pk2cmd.exe

Parameters:

-B$(appdir)tools\PICkit2\ -PPIC$(chip) -F$(target).hex -M -A5 -R


Details on how to upgrade your PICkit 2 to work with new targets are available from here.


Please note that the PICkit 2 was never designed to work with the newer devices and although it is known to work, you may cause damage to your PIC devices by using incorrect VPP programming voltages etc as supplied by the PICkit 2.


PICkit3 - PK3CMD (OLD)

There are two options for using the PICkit 3 depending on how you are powering your hardware:


Powered externally

Location:

$(appdir)tools\PICkit3\PK3CMD.exe

Parameters (8-bit PIC):

-P$(chip) -F$(target).hex -E -M


Parameters (16-bit PIC):

-P$(chip) -F$(target).hex -E -M -L


Powered via the PICkit

Location:

$(appdir)tools\PICkit3\PK3CMD.exe

Parameters (8-bit PIC):

-P$(chip) -F$(target).hex -V5 -E -M


Parameters (16-bit PIC):

-P$(chip) -F$(target).hex -V3.3 -E -M -L


Please note that the PICkit 3 will fail to program if you have spaces in your Flowcode project name, replacing spaces with underscores or removing them completely should resolve the issue.


Also note that if your using the PICkit 3 with MPLABX or have bought a new one recently then you will likely have to downgrade the firmware to allow Flowcode to work with the PICkit.

Full details on how to do this are available from here.


If your still having problems getting the PICkit 3 to fire up then this forum topic may be of help.


PICkit3 - IPE (NEW)

First make sure you have the latest MPLAB X installed on your computer. We used version 4.20 which is used in the location path shown below. Make sure your path matches your installed location.

There are two options for using the PICkit 3 depending on how you are powering your hardware:


Powered externally

Location:

C:\Program Files (x86)\Microchip\MPLABX\v4.20\mplab_platform\mplab_ipe\ipecmd.exe

Parameters:

/P$(chip) /F"$(outdir)$(target).hex" /TPPK3 /M /OL


Powered via the PICkit

Location:

C:\Program Files (x86)\Microchip\MPLABX\v4.20\mplab_platform\mplab_ipe\ipecmd.exe

Parameters - Powered at 3V3:

/P$(chip) /F"$(outdir)$(target).hex" /TPPK3 /M /OL /W3.3

Parameters - Powered at 5V:

/P$(chip) /F"$(outdir)$(target).hex" /TPPK3 /M /OL /W5


To use the Microchip Real ICE programmer instead of the PICkit 3 substitute the parameter /TPPK3 with /TPRICE


PICkit4

First make sure you have the latest MPLAB X installed on your computer. We used version 4.20 which is used in the location path shown below. Make sure your path matches your installed location.

Version 4.20 is the minimum version that will work with the PICkit 4 hardware.

There are two options for using the PICkit 4 depending on how you are powering your hardware:


Powered externally

Location:

C:\Program Files (x86)\Microchip\MPLABX\v4.20\mplab_platform\mplab_ipe\ipecmd.exe

Parameters:

/P$(chip) /F"$(outdir)$(target).hex" /TPPK4 /M /OL


Powered via the PICkit

Location:

C:\Program Files (x86)\Microchip\MPLABX\v4.20\mplab_platform\mplab_ipe\ipecmd.exe

Parameters - Powered at 3V3:

/P$(chip) /F"$(outdir)$(target).hex" /TPPK4 /M /OL /W3.3

Parameters - Powered at 5V:

/P$(chip) /F"$(outdir)$(target).hex" /TPPK4 /M /OL /W5


ICD3

First make sure you have the latest MPLAB X installed on your computer. We used version 4.20 which is used in the location path shown below. Make sure your path matches your installed location.

There are two options for using the ICD3 depending on how you are powering your hardware:


Powered externally

Location:

C:\Program Files (x86)\Microchip\MPLABX\v4.20\mplab_platform\mplab_ipe\ipecmd.exe

Parameters:

/P$(chip) /F"$(outdir)$(target).hex" /TPICD3 /M /OL


Powered via the ICD3

Location:

C:\Program Files (x86)\Microchip\MPLABX\v4.20\mplab_platform\mplab_ipe\ipecmd.exe

Parameters - Powered at 3V3:

/P$(chip) /F"$(outdir)$(target).hex" /TPICD3 /M /OL /W3.3

Parameters - Powered at 5V:

/P$(chip) /F"$(outdir)$(target).hex" /TPICD3 /M /OL /W5


FS USB

Flowcode PIC comes with a example for using the free microchip USB bootloader. Changing your target to the MCHP_FSUSB will automatically configure the programmer to use the Microchip PDFSUSB programming tool. Note - The USB bootloader firmware must be present on the device to allow the programming tool to connect correctly to the device.


TINY PIC Bootloader

Support for the Serial TINY PIC Bootloader is documented here.


AVR

AVRISP mkII

Location:

$(appdir)compilers\avr\batchfiles\avrc.bat

Parameters:

AVRDUDE $(chipalt) $(chip:l) "$(outdir)$(target).hex" "$(target).hex" 0 $(cfgb) $(cfg0) $(cfg1) $(cfg2) $(cfg3)


USB Tiny

Location:

$(appdir)compilers\avr\batchfiles\avrc_usbtiny.bat

Parameters:

AVRDUDE $(chipalt) $(chip:l) "$(outdir)$(target).hex" "$(target).hex" 0 $(cfgb) $(cfg0) $(cfg1) $(cfg2) $(cfg3)


AVR Dude

The AVRDUDE programming tool supports a number of third party programmers for more help and information please visit the AVRDUDE home page.

AVRDUDESS is a graphical user interface for AVRdude.


Arduino

Flowcode Arduino allows you to specify a COM port to connect to the Arduino hardware via the Flowcode Project options window. Once you have specified the COM port and selected the correct target board the compile to chip option should program the Arduino device automatically using AVR dude.


Arduino Mega 2560 R1/R2

Flowcode is currently unable to program early versions of the Arduino Mega hardware. To program these devices use the tool Xloader to manually load the Flowcode generated .hex file onto the device.


ARM

Flowcode ARM comes with a set of precompiled bootloader files. This allows the matrix mLoader USB reprogrammable operation to be used on any third party ARM hardware.


mLoader

mLoader is the default programming software and can be used to talk to the various Matrix hardware including EB006, EB064, EB031, Formula Flowcode, ECIO, MIAC, ProtoBoard, ProjectBoard...

Location:

$(appdir)tools\mLoader\mLoader.exe

Parameters:

-eb0310 "$(target).s19"


SAM-BA

The SAM-BA tool is provided by Atmel and works with the default SAM7S bootloader which can be automatically restored to the device by powering up the ARM hardware for ten seconds using the TST jumper in the none default setting. Note this will delete the Matrix USB bootloader from the device.


ST ARM

ST-LINK

Flowcode by default is setup to use the ST-LINK programmer using the compile to chip option.


Discovery

Discovery boards are programmed by dropping the compiled binary firmware file onto a drive that appears under My Computer. Flowcode can automatically place the file onto the drive for you when using the compile to chip option with a discovery board selected as the target device.


Nucleo

Nucleo boards have a ST-LINK programmer built onto the board and so these work like standard ST ARM targets only without the additional requirement of a ST-LINK programmer.


Raspberry Pi

Raspberry Pi boards can be programmed over the network using Putty which is included with Flowcode. Enter the network details for the Pi into the Flowcode project options and this will allow the compile to chip to connect to the Pi using Putty via a SSH connection. SSH must be enabled on your Pi for this to function correctly but this should be enabled by default.

Personal tools