programming a micro from a set address
Moderator: Benj
-
- Posts: 5
- Joined: Tue Sep 01, 2020 11:23 am
- Contact:
programming a micro from a set address
We were using flowcode v4 and loaded a boot loader on to the micro. then we load the main program to a set address so to not over write the bootloader. we have updated to V8 and cant find out how this is done in V8.
- 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: programming a micro from a set address
Hello,
The way I might do it would be like this.
Browse to this location using file explorer, it's hidden by default so just paste the link into your address bar.
C:\ProgramData\MatrixTSL\FlowcodeV8\FCD\PIC
Assuming it's a PIC based device.
Copy the device FCD you want to use for example 16F18877.fcdx and rename the copy to 16F18877_boot.fcdx
Open the new FCD file in a text editor and find this section of code. It should be right near the top of the file.
Change name to match the new name of the FCD and add namealt='' containing the chip name
For example
Above the <device line add these lines to override the compiler and programmer settings.
The --CODEOFFSET specifies the bootloader shift.
The Programmer can be overridden as required if you want Flowcode's compile to chip to work with your bootloader application.
Save the file and then close and reopen Flowcode and the new device should now be in the target device list.
Hope this helps.
The way I might do it would be like this.
Browse to this location using file explorer, it's hidden by default so just paste the link into your address bar.
C:\ProgramData\MatrixTSL\FlowcodeV8\FCD\PIC
Assuming it's a PIC based device.
Copy the device FCD you want to use for example 16F18877.fcdx and rename the copy to 16F18877_boot.fcdx
Open the new FCD file in a text editor and find this section of code. It should be right near the top of the file.
Code: Select all
<device name='16F18877' product='PIC' cal='PIC' family='16F' bits='8' >
For example
Code: Select all
<device name='16F18877_boot' namealt='16F18877' product='PIC' cal='PIC' family='16F' bits='8' >
Code: Select all
<build>
<compiler exe="$(compilerpic)bin\xc8.exe"
params="--chip=$(chipalt) "$(target).c" --MSGDISABLE=359,1273,1388 --CODEOFFSET=1000h --ROM=default,-0-FFF" />
<programmer exe="$(appdir)tools\mLoader\mLoader.exe" params="-stproto "$(target).hex"" />
</build>
The Programmer can be overridden as required if you want Flowcode's compile to chip to work with your bootloader application.
Save the file and then close and reopen Flowcode and the new device should now be in the target device list.
Hope this helps.
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