Revisit: Xflash failed to compile with custom loader Topic is solved

Technical questions regarding the XTC tools and programming with XMOS.
User avatar
RedDave
Experienced Member
Posts: 77
Joined: Fri Oct 05, 2018 4:26 pm

Post by RedDave »

Did you ever solve your original problem?

My understanding is that the loader passed to xflash is not a completely linked executable, but the intermediate compiled .o file. As such it is not linked to any libraries. This means that your error message makes sense. The .o file does, indeed, not have the fl_ functions defined.
It can also be a raw .xc file and xflash will compile it. Either way there appears no way to link to a library.

I have been trying to do similar, but have failed, so far, to get readFlashDataPage to work. It would also be useful to me to be able to write to flash, as well as read, so linking the quadflash library would be useful.


View Solution
woodsb
Experienced Member
Posts: 79
Joined: Thu Nov 17, 2016 11:24 pm

Post by woodsb »

Hello RedDave,

I was finally able to simultaneously xflash two programs and data, with, on power-up, one program run with one value in low xlfash data location, other run if different value. The programs themselves also read and write from flash data pages. Is this what you are asking about?

I have been away from the work for a ~4 months now, so I will need some time to pull together the details of this if you think that will help. Let me know.

-WB
User avatar
RedDave
Experienced Member
Posts: 77
Joined: Fri Oct 05, 2018 4:26 pm

Post by RedDave »

I have also now got this to work, by use of readFlashDataPage. That covers what I want to do at this stage.

I was still wondering is whether it is possible to use libraries in the loader. Suppose I want to make a decision on which application to load based on communication with an i2c or spi device. But this is more academic interest at this stage, rather than an immediate need.