Secondary flash attempt failed on L2

Technical questions regarding the XTC tools and programming with XMOS.
mmar
Experienced Member
Posts: 123
Joined: Fri Jul 05, 2013 5:55 pm

Secondary flash attempt failed on L2

Post by mmar »

Hi,
i use actual XDE 12.2 for devel app, that controll lcd, uart, infra red,...
First board based on L1 work without trouble. Now same project moved to L8-128 dual core L2
work identic, but only one flash . After first flashing, code started from flash makes issue and second flash return fail. Too debug or direct run over jtag is impossible.
I dont have on board jumpers for jtag start, and need resolve this by other way.
Code uses data partition for images on flash and this i mean makes trouble.

How i can on first flash load empty code parts for booth cores and proper datapartition with images used from code?
Or any other help?
if i replace flash chip with emty, one next flash work ok.
When use empty chip , run and debug work ok, but code is based load images from datapartition on flash,
and developing without this images is impossible.
Maybe help use flash images sometime later on start?

Second question is my flash size. I use 128kB winbond and bootpart set to 64kB and data.
Is this size split for booth cores code? I mean this is ok, first flash work without issues, both cores run and datapart images is showed.


User avatar
Berni
Respected Member
Posts: 363
Joined: Thu Dec 10, 2009 10:17 pm

Post by Berni »

An L2 has a twice as large boot image than an L1 And its a good idea to have a flash thats a bit bigger than what you need(flash in KB sizes is cheep anyway)

There is probably an easier way to save your bricked boards by shorting the CS line on your flash chip to Vdd, do a JTAG load and whatever you need to do and then remove the short from the CS line to make the flash work again so you can flash it again.
mmar
Experienced Member
Posts: 123
Joined: Fri Jul 05, 2013 5:55 pm

Post by mmar »

Thank Berni,
code size on my code is about 20kB per core, then i asume 128kB flash ok.

How with your recommendation CS pull up i can run xflash or run code ?
btw xflash --erase-all ?

I mean this return error. :-)
User avatar
Berni
Respected Member
Posts: 363
Joined: Thu Dec 10, 2009 10:17 pm

Post by Berni »

I don't know if the size of flash images changes depending on how much code is in it. But its a good idea to just stick a large flash on there and be done with it.

Well shorting the CS line is only to keep it from booting your bricked code, once you debug run a simple program from the IDE(Like a led blinker) then you can remove the short so that xflash can access the memory again.
mmar
Experienced Member
Posts: 123
Joined: Fri Jul 05, 2013 5:55 pm

Post by mmar »

I try use CS as you write and now i can run code, but xflash erase utility return error.
Can you write me example code for full erase flash from my code directly over run from xde?