How to increase ROM size for sky mote in Contiki-OS, cooja simulation?

前端 未结 3 1667
忘掉有多难
忘掉有多难 2021-01-07 07:40

I want to use sky mote in my Cooja simulation so that I can access the full functionality of the collect-view tool such as power readings.

However I have had to por

相关标签:
3条回答
  • 2021-01-07 08:08

    This answer may be somewhat late, but I still hope it can help anybody digging here.

    If you are using msp430-gcc and contiki-ng project (may be similar to the old version contiki, I'm not sure), the MCU model is defined at the line 20 of contiki-ng/arch/platform/sky/Makefile.common by setting MCU=msp430f1611. And the link script of the model can be found at msp430/lib/ldscripts/msp430f1611/memory.x of msp430mcu package you installed.

    So you will see the memory map of the model in the file, and the rom region starts at 0x4000 and ends at 0xffe0, which is ~40KiB long.

    You can simply change the MCU model in Makefile.common to msp430f169 to get a ~60KiB ROM, howerver the RAM shrinks to 2KiB. Or you can change the memory map to whatever you like.

    Unfortunately, since msp430 is a 16-bit MCU, you will never get a memory address more than 64KiB with the internal memory, i.e. the total capacity of ROM and RAM can never exceeds 64KiB even if without interupt vectors and peripherals.

    Besides, you also need to modify code in mspsim to make cooja to fit the new memory layout as Johan Bregell says. Things you are probably most interested with are in tools/cooja/mspsim/se/sics/mspsim/config, which sets address, and cooja/mspsim/se/sics/mspsim/platform/sky/CC2420Node.java, which sets the chip model of CC2420.

    0 讨论(0)
  • 2021-01-07 08:25

    The simplest option is to use another mote instead of sky (48 kb ROM). Contiki supports few more msp430 architecture motes, such as Zolertia Z1 (96 kb ROM) and Wismote (up to 256 kb ROM).

    0 讨论(0)
  • 2021-01-07 08:35

    The definitions of the MCU the Sky mote is running on is in the folder contiki/tools/mpsim/se/sics/mpsim/ from here you should be able to modify the amount of memory avalible to the MCU if you know your way around Java.

    0 讨论(0)
提交回复
热议问题