RIOT-OS / RIOT

RIOT - The friendly OS for IoT
https://riot-os.org
GNU Lesser General Public License v2.1
4.88k stars 1.98k forks source link

Support for MSP430X #4136

Closed l3nko closed 5 years ago

l3nko commented 8 years ago

Hi, I'm trying to use msp430 with support for 20-bit registers and a 20-bit address space to use all rom on platforms like z1. I was inspired by contiki MSP430X . I use msp430-gcc v4.7.2 and add this flags:

-mmemory-model=large -mcode-region=far -mdata-region=far -msr20 -mc2

During the compilation I fix some errors, for example at line 64 in cpu/msp430-common/cpu.c

unsigned short *stackptr = (unsigned short*) stk; 

compile get an error for casting pointer from integer of differenet size, so i add the cast to uintptr_t

unsigned short *stackptr = (unsigned short*) (uintptr_t) stk; 

Then I've used z1-bsl-nopic to program a z1, but now RIOT go in a reboot loop. I debug and the problem seems to be in last function called from kernel_init because riot create the threads main and idle but after it reboot.

malosek commented 8 years ago

Hello,

have had look at the recent msp430-common/cpu.c and for me seems like it can not work on 20bits msp-s at the mo. or is it supposed to work?

wbr malo

OlegHahm commented 8 years ago

No, 20 bit MSPs are not supported right now. Feel free to add support. :)

malosek commented 8 years ago

Hello,

Started to work on this, seems doable for the moment. Is anybody else playing with this subject, that we can join the forces?

wbr malo

miri64 commented 7 years ago

Any progress?

malosek commented 7 years ago

Hello,

have it done for TI compiler, but had to make additional changes since TI msp430 compiler does not support "naked" functions which is quite important compiler feature for porting riot... Seems working well, device is up and running since then. Anyway if somebody is interested I can provide CCS workspace with working project. Do not have plans/time to port it to free compiler.

wbr malo

squeekeek commented 7 years ago

Hi everyone! I am also interested in adding MSP430X support in RIOT since we need a mote that has a large memory for our experiments. Is it possible to get a hold of the workspace so that I can continue porting it?

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.