Flash programming startKIT

All technical discussions and projects around startKIT
Post Reply
jmtaylor
Member
Posts: 15
Joined: Tue Aug 20, 2013 10:01 am

Flash programming startKIT

Post by jmtaylor »

Apologies for what seems to be a basic question, but I have not managed to write my startKIT program into persistent flash storage.

I have a project that was initially targeted at the XK-1A development kit. After updating the port mappings, it runs correctly on the startKIT (when "Run" through xtimecomposer. If I try and flash it from xtc or from the command line I get:
Error on tile[0]: failed to connect to flash device. Please verify that SPI type is supported and that the correct SPI ports are defined within your xn file.

I believe this is because the .xn file I have in my project is still for the XK-1A (so understandable that there could be problems), but I cannot find how/where to alter my project to use the correct .xn file. I couldn't spot anything relevant in the docs - can anyone advise? The XK-1A.xn file in my project seems in some way "blessed", since right-clicking does not allow me to remove it.

I tried explicitly specifying the target when flashing from the command line:
xflash --target=STARTKIT --id 0 /path/to/my.xe
but I get a warning:
Warning: F03130 --target/--target-file options ignored when an XE file is given
Nevertheless it seems to program successfully... but the startKIT stays dark and does not seem to be running my program, so I am not sure what has happened there.

Can anyone help?


User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

@jmtaylor,

perhaps not the best method but consider to create a fresh project using the STARTKIT as the target. This will auto-generate the background files for the STARTKIT. Then inside the src folder tree, cut & paste the working code from your XK-1A development kit. Consider this a bit of a hack but know it will work.

If stuck, post your project as-is. It is the XN file that needs to reflect the proper target but recall there are some other support files as well. The current XE compiled code is still linked to your XK-1A development kit.
mdtmttp
Junior Member
Posts: 5
Joined: Mon Sep 18, 2017 9:24 pm

Post by mdtmttp »

Hi jmtaylor,

Have you tried looking at the target in your makefile, that seems to be the easiest way to ensure that the program is set up correctly for the startkit.

I have done this for a couple of the example projects and it seems to have worked for me.

The makefile should be in your project explorer as shown here:
Image

The drop down list you want should be at the top of the file

Hope this helps

Michael
jmtaylor
Member
Posts: 15
Joined: Tue Aug 20, 2013 10:01 am

Post by jmtaylor »

Ah great - thanks. Editing the makefile has fixed things - I had seen the .xn file in the project explorer, but couldn't work out how to change it.

Incidentally (writing this for posterity, in case anyone is ever confused): a strange (but in retrospect understandable) symptom of having the wrong .xn file was that all the clock functionality behaved as if the reference clock was running at 120MHz instead of 100MHz.
Post Reply