[riot-devel] Working on port to SODAQ Autonomo (SAMD21)

Peter Kietzmann peter.kietzmann at haw-hamburg.de
Wed Jun 15 09:32:23 CEST 2016

Hi Kees,

if you volunteer you could start with moving code to samd21_common and 
open PR(s) for that :-). Seems like a step in the right direction. I 
personally won't find time for that unfortunately. On our side we could 
test your PR(s) with the samr21-xpro board and AFAIK Kaspar has a 
saml21-xpro board.

Regarding the UART issue, could you give some more insights about the 
pad you want to add to uart_conf_t? I just gave it a quick look into the 
reference manual


but on the first sight I didn't see a difference to



Am 14.06.2016 um 20:30 schrieb Kees Bakker:
> On 13-06-16 22:39, Peter Kietzmann wrote:
>> Hi Kees,
>> honestly just now I got your actual problem and I remember what I
>> stumbled upon this morning:
>> # define the cpu used by SAMR21 Xplained Pro board
>> export CPU = samd21
>> export CPU_MODEL = samr21x18a
>> https://github.com/RIOT-OS/RIOT/blob/master/boards/samr21-xpro/Makefile.include
>> However, I won't say "for RIOT that's good enough". To summarize: The
>> main questions are (i) how to split different CPUs/MCUs with rather
>> small differences and (ii) how to reuse most of the code. Right?
> Correct.
>> For (ii) it would obviously be the best way to have drivers and stuff
>> in the common folder. Personally I have no idea if this is possible or
>> not, it depends on the differences. If these are too big, one needs to
>> stay with a separate CPU folder for each "family".
> Yes, that is certainly possible. All these SAM devices can be handled
> with a common code base. Someone
> already started such a common place: cpu/sam21_common. We should
> continue with that.
> If you ask me, I'd say that already a lot of files from
> cpu/samd21/periph can be moved to cpu/sam21_common.
>> For (i) won't it be enough to export the CPU_MODEL by the board and
>> adjust the include paths properly, as done e.g. here?
> Yes, that is the right thing to do. For Atmel there is one more thing:
> CFLAGS must have a define like -D__SAMD21J18A__,
> otherwise the correct include files aren't selected.
>> https://github.com/RIOT-OS/RIOT/blob/master/cpu/stm32f3/include/cpu_conf.h#L27
>> One other question is the need for changing the CPU name of the Atmel
>> samr21-xpro board from "samd21" to "samr21". In your regards I think
>> it could make sense but with a solution as described in (i) above,
>> there won't be a need for that. Do I see that correctly?
> I don't care too much how the CPU is called. But maybe it is useful to
> know which CPU variant
> it is, like SAMD21J18A.
>> Generally I'm not too much into Atmels product series and I would like
>> to hear Kaspar's opinion as he knows RIOTs architecture much better
>> than me.
> I'd be interested to know what Kaspar thinks about it.
> _______________________________________________
> devel mailing list
> devel at riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel

Peter Kietzmann

Hamburg University of Applied Sciences
Dept. Informatik, Internet Technologies Group
Berliner Tor 7, 20099 Hamburg, Germany
Fon: +49-40-42875-8426
Web: http://www.haw-hamburg.de/inet

More information about the devel mailing list