Flashing Program Basic Question

Technical questions regarding the XTC tools and programming with XMOS.
pattobrien
Junior Member
Posts: 4
Joined: Thu Jul 10, 2014 3:27 am

Flashing Program Basic Question

Post by pattobrien »

Hi All,

This is probably a dumb question, but I'm a bit lost right now. The U16 SliceKit is the first dev board I've ever used, as I just recently moved over from the Arduino community. Obviously, it's a huge jump, but I'm managing. I currently modified the SPI_master_demo application to control a 74hc595 register through the MOSI and SCLK ports, plus a free 1-bit port for slave select... This is about as complex as the rest of my program will be, so I feel as though I'm in the clear. Now my issue is, I have my program rotating LEDs that are connected to the hc595, but I can only get the program to work if I use the "Run" command, and it doesn't work when I simply power on the board, even if the program's flashed onto it. I feel as if that sentence warrants a facepalm or two from users, but as you might know, Arduino boards has just a simple "upload" button. If someone could please explain Run vs Flash, and how I could get my program working without having to Run it via xTimeComposer, I'd really appreciate it! Thanks a lot guys,

Pat


pattobrien
Junior Member
Posts: 4
Joined: Thu Jul 10, 2014 3:27 am

Post by pattobrien »

Okay, apparently it was something that even I facepalmed to. I was flashing one of the .xc files, not the entire .xe file. Stupid mistake.. AND after figuring that out, I did some more fiddling around and it seems as if Run temporarily sends the program to the JTAG connector to test the program instead of having to wait an additional period of time for the board to be flashed. So you would just use Run to save time until it was time to Flash the board and disconnect it from the PC. Does this sound correct? Thanks again,

Pat
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am

Post by infiniteimprobability »

Glad it's fixed! Thanks for sharing your discovery..
So you would just use Run to save time until it was time to Flash the board and disconnect it from the PC
Yep - that's the fast/easy way to do it. Also, it means you can turn on debug (printing or xscope tracing if you have connected the link), exception reporting or even use GDB (or debug configuration in the GUI) to step/watch/do all of the the normal debug things..