[riot-devel] RIOT vectors for Smartfusion2 port

Ashim Asharaph AAsharaph at csir.co.za
Wed May 29 10:58:24 CEST 2019


Dear Juan

The board is the sf2-starter-kit and the CPU is the m2s010, which contains a Cortex M3.


I have made a publicly accessible repo with all the code available at:
https://github.com/ashimasharaph/SmartFusion2_riot_port



I see now that the makefile in makefiles/arch/cortexm.inc.mk has the code


# Explicitly tell the linker to link the startup code.
#   Without this the interrupt vectors will not be linked correctly!
VECTORS_O ?= $(BINDIR)/cpu/vectors.o
ifeq ($(COMMON_STARTUP),)
export UNDEF += $(VECTORS_O)
endif


and the Makefile.include in the m2s_xxx cpu folder has:

include $(RIOTMAKE)/arch/cortexm.inc.mk



How should I go about removing that code and do I need to replace it with anything? Any help would be appreciated.


Kind regards
Ashim Asharaph





>>> Juan Ignacio Carrano <j.carrano at fu-berlin.de> 05/28/19 5:01 PM >>>
[The e-mail server of the sender could not be verified (SPF Record)]

Hi Ashim,

I assume you are basing your SmartFusion port on some existing CPU. If 
that's the case, it would be useful to know which one. Even better if 
you can link us to a publicly accessible repo.

> I have tried including this file in the new cpu folder I 
> created but get the following error when trying to make:
> arm-none-eabi-gcc: error: 
> /home/user/Desktop/SmartFusion2/testjig/riot/2019.04/examples/hello-world/bin/sf2-starter-kit/cpu/vectors.o: 
> No such file or directory
> 

The first question is why the build system is expecting to find 
vectors.o. Not all CPUs generate that file (in your case you would 
compile startup_m2sxxx.S into startup_m2sxxx.o) I believe the answer to 
this question lies in the CPU you started with.

For example: you mention the LPC2387. If you compile any example with
BOARD=msba2 (which uses that cpu) and look inside "bin/msba2/cpu" you 
will not find any vectors.o and that's OK.

> How do I use the above file correctly in the RIOT port? Is there some 
> configuration that should be changed to use the file properly or should 
> I convert it to a vectors.c file? If so, how do I go about doing so?
> 

AFAIK you should not need to convert anything, just place the .S file in 
your CPU directory, but without knowing the full contents of the dir it 
is hard to tell what is happening.

Regards,

Juan.
_______________________________________________
devel mailing list
devel at riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/devel/attachments/20190529/e47e184b/attachment.html>


More information about the devel mailing list