Hi everyone!
I tried to compile the AN00109 app for the XK-AUDIO-316-MC-AB board.
I went through all the steps in an00109 .pdf instruction, but unfortunately
I am getting the following error(loader.xc):
AN00109_src\src>xflash --factory app_factory_image_button_up/bin/app_factory_image_button_up.xe --upgrade 1 app_factory_image_button_down/bin/app_factory_image_button_down.xe --loader loader.o
xmap: Error: Target core mismatch between "XS3" (from "main.c") and "XS1" (from "loader.xc").
Error: F03010 Failed to compile second stage bootloader
Has anyone experienced this issue?
Then I tried the code described in "Customize flash loader" paragraph in XMOS XTC Tools 15.2 guide
(file.xc)
But with this example I cant produce the loader.o file:
AN00109_src\src>xcc -c file.xc -o loader.o
file.xc:6:1: error: pointer return type must be marked movable, alias or unsafe
extern void * readFlashDataPage(unsigned addr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
file.xc:8:5: error: void * pointer must be declared as unsafe
void* imgAdr;
^~~~~~~~
file.xc:11:7: error: void * pointer must be declared as unsafe
void* ptr = readFlashDataPage(0);
^~~~~
file.xc:20:10: error: assignment to restricted pointer
imgAdr = adr;
~~~~~~~^~~~~
file.xc:24:10: error: incompatible types in return
return imgAdr;
^~~~~~
I assume that the method described in AN00109 app notes doesn't work because of different architectures, but
the example described in XTC Tools 15.2 doesn't work also.
What I am trying to do is actually switch between two apps with a button.
Has anyone had any experience with the custom bootloader? What can be the reason for those issues?
Best regards,
Vladimir
AN00109: https://www.xmos.com/download/AN00109:- ... .1rc1).pdf
Customized flash loader: https://www.xmos.com/documentation/XM-0 ... ash-loader
Porting the AN00109: Multiple-Firmware-Booting app onto XK-AUDIO-316-MC-AB development kit
-
- Member++
- Posts: 20
- Joined: Tue Dec 12, 2023 11:33 pm
Porting the AN00109: Multiple-Firmware-Booting app onto XK-AUDIO-316-MC-AB development kit
You do not have the required permissions to view the files attached to this post.
-
- XCore Addict
- Posts: 131
- Joined: Fri Jul 05, 2013 5:55 pm
For 216 i create makefile and use make to create o file.
change 216 to 316...
Code: Select all
TARGET = x216_C20A.xn
OBJS = loader.o
SOURCE = loader.xc
HEADER =
OUT =
CC = xcc
FLAGS = -c -Wall -march=xs2a
LFLAGS =
all: $(OBJS)
loader.o: loader.xc
$(CC) $(FLAGS) loader.xc
clean:
rm -f $(OBJS) $(OUT)
XMOS_MAKE_PATH ?= ../..
ifneq ($(wildcard $(XMOS_MAKE_PATH)/xcommon/module_xcommon/build/Makefile.common),)
include $(XMOS_MAKE_PATH)/xcommon/module_xcommon/build/Makefile.common
else
include ../module_xcommon/build/Makefile.common
endif
-
- Member++
- Posts: 20
- Joined: Tue Dec 12, 2023 11:33 pm
Hi mmar,
Many thanks for your answer, it works!
I also changed -march=xs2a to -march=xs3a
Best regards,
Vladimir
Many thanks for your answer, it works!
I also changed -march=xs2a to -march=xs3a
Best regards,
Vladimir
-
- Member++
- Posts: 20
- Joined: Tue Dec 12, 2023 11:33 pm
I rewrote a little bit AN00109 app for the XK-AUDIO-316-MC-AB board.
and now it works as expected.
So, instructions for everyone who is interested:
1) xmake
in the main src folder
2) xmake loader.o
in the loader folder
3) xflash --factory app_factory_image_button_up/bin/app_factory_image_button_up.xe --upgrade 1 app_factory_image_button_down/bin/app_factory_image_button_down.xe --loader loader/loader.o
in the main src folder
The app works as follows:
Powering up without any buttons pressed: LED 1 and 2 are lightning
Powering up with Button 0 or 1 or 2 pressed: LED 0 and 3 are lightning
All files are inside .zip
Best regards,
Vladimir
and now it works as expected.
So, instructions for everyone who is interested:
1) xmake
in the main src folder
2) xmake loader.o
in the loader folder
3) xflash --factory app_factory_image_button_up/bin/app_factory_image_button_up.xe --upgrade 1 app_factory_image_button_down/bin/app_factory_image_button_down.xe --loader loader/loader.o
in the main src folder
The app works as follows:
Powering up without any buttons pressed: LED 1 and 2 are lightning
Powering up with Button 0 or 1 or 2 pressed: LED 0 and 3 are lightning
All files are inside .zip
Best regards,
Vladimir
You do not have the required permissions to view the files attached to this post.