Adding spi boot loader to USB audio 2.0

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

Adding spi boot loader to USB audio 2.0

Post by alexjaw »

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: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

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

https://www.xcore.com/viewtopic.php?t=6132
User avatar
akp
XCore Expert
Posts: 578
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

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.
Post Reply