Adding spi boot loader to USB audio 2.0

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
alexjaw
Active Member
Posts: 33
Joined: Wed Jan 24, 2018 9:13 am

Adding spi boot loader to USB audio 2.0

Postby alexjaw » Tue Oct 29, 2019 1:23 pm

Hi all,
I wonder how to go about to change the present default boot loader in usb audio to the boot loader presented in application note AN00238. It seems reasonable to update the Makefile of app_usb_aud

BUILD_FLAGS = -DFLASH_MAX_UPGRADE_SIZE=64*1024 -fcomment-asm -Xmapper --map -Xmapper MAPFILE -Wall -O3 ...

to something like

BUILD_FLAGS = -DFLASH_MAX_UPGRADE_SIZE=64*1024 -fcomment-asm -lloader -Xmapper --first -Xmapper loader_pre_crt.o loader_init.o -Wall -O3

where I have taken the bold text from the Makefile in AN00238. Then, the next question is how the loader code from AN00238 should be incorporated in the application? Have tried to just copy the loader directory to the src folder of the app, but that generates xcc error:

xmake CONFIG=2i10o10xxxxxx all
Checking build modules
Using build modules: module_usb_shared module_xud module_usb_audio module_spdif_tx module_spdif_rx module_usb_midi module_dfu module_usb_device module_i2c_shared module_i2c_single_port module_adat_tx module_adat_rx module_queue module_locks
Analyzing flashlib_user.c
xcc: loader_init.o: No such file or directory
xmake[1]: *** [.build_2i10o10xxxxxx/_m_usb_audio/flashlib_user.c.pca.xml.decouple] Error 1
xmake: *** [analyze] Error 2

So, what is the recommended way to incorporate a module such as the loader for the usb audio app?

Thanks
AJ
User avatar
mon2
XCore Legend
Posts: 1592
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Mon Nov 04, 2019 1:52 pm

Hi. Believe that your issue is related to missing files or folder structure but moving forward review the following threads:

viewtopic.php?t=6132
User avatar
akp
Respected Member
Posts: 337
Joined: Thu Nov 26, 2015 11:47 pm

Postby akp » Tue Dec 03, 2019 7:55 pm

I may be wrong but I think that xcc will look in the same directory as your Makefile for the loader_init.o file with the BUILD_FLAGS you've got there.

Who is online

Users browsing this forum: No registered users and 0 guests