Open iamxg opened 7 years ago
msp430-gcc 4.6 upgrade to 4.7, but this issue still occur.
@iamxg if you check carefully the line highlight the error mention that the code you trying to compile it's too big for the Sky mote (overflowed by 26KB of ROM). I've seen a lot of people with this same issue. I recommend you to start with the Wismote, which has a lot more memory to run codes.
If you strictly need the Sky mote, I sugest you take a moment and reanalyze all specification needed in your project.
By the way, this is the motes memory: Sky 48 KB ROM Z1 up to 96 KB ROM Wismote up to 256 KB ROM
Note: check if the makefile is configured correctly to use the memory needed.
Best regards!
Thanks a lot.
Happy weekend,
Xian G
-----Original Message----- From: fabricio-godoi notifications@github.com To: contiki-os/contiki contiki@noreply.github.com Cc: Xian Guo iamxguo@aol.com; Mention mention@noreply.github.com Sent: Fri, Aug 4, 2017 2:41 pm Subject: Re: [contiki-os/contiki] How to resolve msp430 problem? (#2280)
@iamxg if you check carefully the line highlight the error mention that the code you trying to compile it's too big for the Sky mote (overflowed by 26KB of ROM). I've seen a lot of people with this same issue. I recommend you to start with the Wismote, which has a lot more memory to run codes. If you strictly need the Sky mote, I sugest you take a moment and reanalyze all specification needed in your project. By the way, this is the motes memory: Sky 48 KB ROM Z1 up to 96 KB ROM Wismote up to 256 KB ROM Note: check if the makefile is configured correctly to use the memory needed. Best regards! — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
4.7.2 version works well, you can refer to past thread about this issue.
Ok, Thank you very much! I will try it.
It can't work.
it's much better if you use Z1 instead of Sky.
I'm having a similar issue. In my case I can compile a skymote as a border router using the file contiki/examples/ipv6/rpl-border-router/border-router.c (just as shown in here ). But when I try to use a wismote instead, the error comes up. It says that there is no ROM available. I've already tried: To use the msp430-gcc v4.7.0 (in this case cooja didn't open); To use two different versions installed msp430-gcc (4.6.3 and 4.7.0), but the error still occur.
Is this a compiling issue? Any hint appreciated!
Hi everyone, Thanks a lot. I will try these methods.
One last hint I can give you guys is to check if the Makefiles are correct. Each platform has it's own makefile, like Makefile.wismote or Makefile.z1, look in it and check if it's enabled the CPU_HAS_MSP430X=1. This will enable in Makefile.msp430 to configure the ROM size of the MCU. Note that Sky mote does not have this feature!
Also, check the "application".map file, there will be some section like this below, so check the actual length of the ROM to see how much is needed to run the code. Note that it's value is absolutely after compiling the code:
Memory-Configuration
Name-------------Origin-------------Length-------------Attributes sfr----------------0x00000000---------0x00000010 peripheral_8bit--0x00000010---------0x000000f0 peripheral_16bit-0x00000100---------0x00000100 bsl---------------0x00001000---------0x00000800 infomem--------0x00001800---------0x00000200 infod------------0x00001800---------0x00000080 infoc------------0x00001880---------0x00000080 infob------------0x00001900---------0x00000080 infoa------------0x00001980---------0x00000080 ram--------------0x00001c00---------0x00004000---------xw rom--------------0x00005c00---------0x0000a380---------xr <<<<<< HERE the ROM size vectors----------0x0000ff80---------0x00000080 far_rom----------0x00010000---------0x00035c00 ram2-------------0x00000000---------0x00000000---------xw ram_mirror-------0x00000000---------0x00000000---------xw usbram-----------0x00000000---------0x00000000---------xw default--------0x00000000---------0xffffffff
(I replaced the space with '-' to make easier to read here)
For more information see the options of the msp430-gcc: https://gcc.gnu.org/onlinedocs/gcc/MSP430-Options.html
/platform/Wismote/Makefile.wismote /cpu/msp430/Makefile.msp430
By the way, I'm using msp430-gcc 4.7.0.
Good luck! Best regards!
@fabricio-godoi program code is also stored in far_rom
section - that's the one sky
is missing and msp430-gcc-4.6 does not support.
If CPU_HAS_MSP430X=1
is defined and the toolchain is recent enough, it will put some parts of code in addresses >= 0x00010000, i.e. the extended memory.
Rumor has it that 4.7.2 and 4.7.3 has fixed some bugs related to the extended memory support. Get the binaries here: https://github.com/pksec/msp430-gcc-4.7.3
I solved the problem by updating the compiler following the instructions in here. The main steps I followed: 1) Installing msp430-gcc version 4.7.3 and restarted the VM. So both versions are installed. The shortcut for the new version is msp430-gcc-4.7.3 2) Changing the file contiki/cpu/msp430/Makefile.msp430 . Updating the compiler used in CC (apparently for the ROM) and LD (apparently for the RAM) lines to the new one.
#CC = msp430-gcc
CC = msp430-gcc-4.7.3
#LD = msp430-gcc
LD = msp430-gcc-4.7.3
Now it is possible to compile the rpl-border-router.c using the wismote platform with 20-bit support.
Thanks, everyone.
Hello,
I followed the same steps as per mentioned here but when I compiled with any mote like sky, z1 or wisemote it gives me the following error.
make: msp430-gcc-4.7.3: Command not found fatal: Not a valid object name HEAD
Please help me.
Hello,
I followed the same steps as per mentioned here but when I compiled with any mote like sky, z1 or wisemote it gives me the following error.
make: msp430-gcc-4.7.3: Command not found fatal: Not a valid object name HEAD
Please help me.
Sorry, I don't know how to resolve. My problem also is not resolved until now.
Regards,
Xian G
-----Original Message----- From: Vishal Rathod notifications@github.com To: contiki-os/contiki contiki@noreply.github.com Cc: Xian Guo iamxguo@aol.com; Mention mention@noreply.github.com Sent: Wed, Nov 8, 2017 10:00 am Subject: Re: [contiki-os/contiki] How to resolve msp430 problem? (#2280)
Hello, I followed the same steps as per mentioned here but when I compiled with any mote like sky, z1 or wisemote it gives me the following error. make: msp430-gcc-4.7.3: Command not found fatal: Not a valid object name HEAD Please help me. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Hello everyone,
I reach a similar problem today, even with the CPU_HAS_MSP430X=1, aparrently there some bug with this directive, not sure though.
I had to change the mcode-region flag from 'any' to 'far' at Makefile.msp430 line 156, and then the code was able to be compiled.
Before: CFLAGS += -ffunction-sections -fdata-sections -mcode-region=any After: CFLAGS += -ffunction-sections -fdata-sections -mcode-region=far
@atiselsts I didn't know about the GCC versions problems, I just assumed that was some kind of flag configuration problem, thanks you about it. The sky mote does not have this feature because it has only 48K of ROM, so I recommended switch it to the Wismote.
Regards
@vishal623, you must point your PATH
environment variable to the 4.7.3 version's "bin" directory (step #2
). But, don't do it in "~/.bashrc
"! Do it in "~/.profile
" (or "~/.bash_profile
").
Thanks, sir. I will try and let you know its working for me or not.
On Tue, Nov 21, 2017 at 11:21 PM, greg-king5 notifications@github.com wrote:
@vishal623 https://github.com/vishal623, you must point your PATH environment variable to the 4.7.3 version's "bin" directory (step #2). But, don't do it in "~/.bashrc"! Do it in "~/.bash_profile".
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/contiki-os/contiki/issues/2280#issuecomment-346107462, or mute the thread https://github.com/notifications/unsubscribe-auth/AIAuu-0ShpZ6DsA8AKR_zuvOABXxCKPJks5s4w2kgaJpZM4OtQUb .
-- Vishal Rathod Research Scholar, Computer Science and Engineering Department, National Institute of Technology, Karnataka.
was this problem solved ??
And by the way @vishal623 I had the same problem, am still having troubles in upgrading my msp gcc compilers did you solve it?
Yes. It is working for me. When I have checked the version of msp430, it shows me the new version, but Contiki-3.0 doesn't accept it for me.
On Tue, Apr 10, 2018 at 4:30 PM, Siddarth1511 notifications@github.com wrote:
was this problem solved ??
And by the way @vishal623 https://github.com/vishal623 I had the same problem, am still having troubles in upgrading my msp gcc compilers did you solve it?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/contiki-os/contiki/issues/2280#issuecomment-380059251, or mute the thread https://github.com/notifications/unsubscribe-auth/AIAuuzzff80RjSbjMKsif8My509tB4gjks5tnJC6gaJpZM4OtQUb .
-- Vishal Rathod Research Scholar, Computer Science and Engineering Department, National Institute of Technology, Karnataka.
what did you do to solve it @vishal623 ? I changed path in .profile it shows me this
I just switched back to Contiki-2.7 and all is well.
On Tue, Apr 10, 2018 at 6:43 PM, Siddarth1511 notifications@github.com wrote:
what did you do to solve it @vishal623 https://github.com/vishal623 ? I changed path in .profile it shows me this [image: screenshot from 2018-04-10 15 00 18] https://user-images.githubusercontent.com/34597029/38558814-a33679be-3cd1-11e8-97b8-8bc2768a8a7f.png
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/contiki-os/contiki/issues/2280#issuecomment-380093163, or mute the thread https://github.com/notifications/unsubscribe-auth/AIAuuzQxG8RkYaefsnkMZQYb9SfQtHiCks5tnK_vgaJpZM4OtQUb .
-- Vishal Rathod Research Scholar, Computer Science and Engineering Department, National Institute of Technology, Karnataka.
oh alright i will try doing that did you follow the 2 steps given in the readme file and also did you change CC = msp430-gcc line in makefile
@vishal623
Yes.
On Tue, Apr 10, 2018 at 6:49 PM, Siddarth1511 notifications@github.com wrote:
oh alright i will try doing that did you follow the 2 steps given in the readme file and also did you change CC = msp430-gcc line in makefile
@vishal623 https://github.com/vishal623
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/contiki-os/contiki/issues/2280#issuecomment-380094978, or mute the thread https://github.com/notifications/unsubscribe-auth/AIAuuzxOIe6O2UBLYxvSv5A5vfL2pd7Xks5tnLFXgaJpZM4OtQUb .
-- Vishal Rathod Research Scholar, Computer Science and Engineering Department, National Institute of Technology, Karnataka.
Try changing the PATH line to:
PATH=/opt/compilers/mspgcc-4.7.3/bin:$PATH
In which file .bashrc or .profile?? @greg-king5 Thanks for helping me out
~/.bashrc
is for things that aren't inherited by shells -- such as aliases, environment variables that aren't exported, and functions. ~/.profile
(or ~/.bash_profile
) is for system settings and exported variables (such as PATH
).
It worked!!! Thank you so much @greg-king5 @vishal623 It didn't work when i tried what you said in Instant contiki (VMware player) But worked when i tried in dual boot ubuntu 14.04 Thanks again!
@greg-king5 @Siddarth1511 shoud i have to remove msp430-gcc {4.6.3} packages ? before doing the above steps? updating to 4.7.3 ? please help...working on contiki...er-coap..ubuntu 16.04
are you using instant contiki? or a dual boot ubuntu os with contiki? @tejaeluri
Dual boot Ubuntu 16.04 LTS with contiki 3.0
On Sun 29 Apr, 2018, 4:21 PM Siddarth1511, notifications@github.com wrote:
are you using instant contiki? or a dual boot ubuntu os with contiki? @tejaeluri https://github.com/tejaeluri
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/contiki-os/contiki/issues/2280#issuecomment-385242514, or mute the thread https://github.com/notifications/unsubscribe-auth/Agg-VH6QQNkjUcHfcZ9Zoc4K8zEtHu8pks5ttZs9gaJpZM4OtQUb .
Alright i didn't remove anything just extracted the files to the location, changed the compiler version in makefile.msp430, added the path in .profile restarted the system worked like a charm
ohh...thanks...can you tell me which versions of ubuntu and contiki you are using??
ubuntu 14.04 and i was using contiki-master
"add PATH MSP430/bin path to your environment " i didnt get this point..should i have to add path in /etc/environment ?? Please explain this.. @Siddarth1511
On Sun 29 Apr, 2018, 6:43 PM Siddarth1511, notifications@github.com wrote:
ubuntu 14.04 and i was using contiki-master
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/contiki-os/contiki/issues/2280#issuecomment-385250625, or mute the thread https://github.com/notifications/unsubscribe-auth/Agg-VFgZ4Qswi6NY3MdDaN9HHtIfdpRUks5ttbxlgaJpZM4OtQUb .
@pcumino @greg-king5 @Siddarth1511 Guyz..help me out..how to add path in environment ?? im following these instructions... https://github.com/pksec/msp430-gcc-4.7.3
you have to open the .profile file ( gedit .profile) and add wherever you placed your msp430(4.7.3) folder Then go to makefile.msp430 change CC and LD to msp430-gcc-4.7.3 restart your system and check it
Hello @Siddarth1511
I have followed the steps that were given by https://github.com/pksec/msp430-gcc-4.7.3.
1) I didn't remove the olde version of msp430. 2) I have extracted the msp430-gcc-4.7.3 to /opt/compilers/. Inside that there will be one more zip file so I also extracted it and mv outside of that directory and gave the name of msp430-gcc-4.7.3. 3) I have added the path in /etc/environment. which is msp430-gcc-4.7.3/msp430/bin 4) I have added the path in ~/.profile. which is msp430-gcc-4.7.3/bin 5) I have also updated the CC and LD variables in Makefile.msp430
When I checked the version of msp430 it shows me 4.7.3 but when I run the border router on sky mote it shows ms msp430-gcc-4.7.3 command not found.
Even when I run the er-rest-client on z1 it shows me the same error.
hi , how i can install a contiki on ubuntu please ??
Hello @vishal623
I also follow the same steps and i have the same problem, the version shows me 4.7.3 but Cooja shows me msp430-gcc-4.7.3 command not found.
please did you solve the problem?
@vishal623 @Sara-94 Sorry for the delayed reply. I followed the exact same steps and restarted ubuntu once more And it worked for me. Did you echo your path and see if it points to 4.7.3 version ?
Thank you so much for replay @Siddarth1511 This is the echo of the PATH it point to 4.7.3 version
Even I have the same error since last 8 months.
On Thu, Mar 21, 2019 at 3:05 AM Sara-94 notifications@github.com wrote:
Thank you so much for replay @Siddarth1511 https://github.com/Siddarth1511 This is the echo of the PATH [image: echo] https://user-images.githubusercontent.com/30484241/54720696-754fec00-4b36-11e9-8a84-e1b5333908c2.png it point to 4.7.3 version
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/contiki-os/contiki/issues/2280#issuecomment-475037794, or mute the thread https://github.com/notifications/unsubscribe-auth/AIAuu9tM3nYRTyvL-bda4oIOOuR_LCBhks5vYqmegaJpZM4OtQUb .
-- Vishal Rathod Research Scholar, Department of Computer Science and Engineering, National Institute of Technology, Karnataka. Email ID: vishalrathod.cs15f11@nitk.edu.in and vishalrathod@ieee.org
Thanks for your replay @vishal623 I tried from 3 weeks and try the steps for Contiki 3.0 and Contiki 2.7, also i try it in other computer and its still not work Is there any other ways to increase the memory of z1 mote? Note: i know that the wismote have more memory than z1 but when i try the code on z1 it overflow by 2300 bytes (for coap server and border router run without problem) and when try wismote it overflow by 7476 bytes (for border router) and 12982 (for coap server), why the wismote seems to have less memory than z1 mote??
Hello @vishal623 I can force Cooja to use msp430-gcc-4.7.3 by using "sudo update-alternatives --install /usr/bin/msp430-gcc gcc /opt/compiler/mspgcc-4.7.3/bin/msp430-gcc-4.7.3 50" also use "sudo update-alternatives --install /usr/bin/msp430-gcc gcc /usr/bin/msp430-gcc-4.6.3 40" so you can choose any version you want by using "sudo update-alternatives --config gcc" but another error appear as this picture, I dont know how to fix it
Let me try this and let you know about the same.
Sent from my iPhone
On 25-Mar-2019, at 7:05 PM, Sara-94 notifications@github.com wrote:
Hello @vishal623 I can force Cooja to use msp430-gcc-4.7.3 by using "sudo update-alternatives --install /usr/bin/msp430-gcc gcc /opt/compiler/mspgcc-4.7.3/bin/msp430-gcc-4.7.3 50" also use "sudo update-alternatives --install /usr/bin/msp430-gcc gcc /usr/bin/msp430-gcc-4.6.3 40" so you can choose any version you want by using "sudo update-alternatives --config gcc" but another error appear as this picture
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
This is what i did (it works for me): 1- install ubuntu 14-04 (32bit) 2- download latest contiki 3.0 from sourceforge.net 2.1- extract contiki 3.0 files in "/home/" 3- Download the msp430-47 binary files from sourceforge.net (msp430-47 is an experimental tool chain which gives extra 20bit memory for motes) 3.1- Extract the files in "/home/msp430-47" 3.2- In Home directory click (Ctrl+H) to open hidden files and find ".bashrc" and ".profile" files 3.3 open those files and add “export PATH=/home/user/msp430-47/bin:$PATH” in end of the codes. (this Path will helps the Contiki to use the tool chain) 4- To increase Z1 motes memory 4.1 go to path "Home/contiki/platform/z1" 4.2 open file "contiki-conf.h" 4.3 increase buffer size to 240 " #define UIP_CONF_BUFFER_SIZE 240" and save it 4.4 restart pc 4.5 its done
When I tried following command
sudo update-alternatives --install /usr/bin/msp430-gcc gcc /opt/compiler/mspgcc-4.7.3/bin/msp430-gcc-4.7.3 50
it shows me following error in cooja:
msp430-gcc: error: unrecognized command line option ‘-mmcu=msp430f2617’
On Tue, Mar 26, 2019 at 8:09 AM tejaeluri notifications@github.com wrote:
This is what i did (it works for me): 1- install ubuntu 14-04 (32bit) 2- download latest contiki 3.0 from sourceforge.net 2.1- extract contiki 3.0 files in "/home/" 3- Download the msp430-47 binary files from sourceforge.net (msp430-47 is an experimental tool chain which gives extra 20bit memory for motes) 3.1- Extract the files in "/home/msp430-47" 3.2- In Home directory click (Ctrl+H) to open hidden files and find ".bashrc" and ".profile" files 3.3 open those files and add “export PATH=/home/user/msp430-47/bin:$PATH” in end of the codes. (this Path will helps the Contiki to use the tool chain) 4- To increase Z1 motes memory 4.1 go to path "Home/contiki/platform/z1" 4.2 open file "contiki-conf.h" 4.3 increase buffer size to 240 " #define UIP_CONF_BUFFER_SIZE 240" and save it 4.4 restart pc 4.5 its done
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/contiki-os/contiki/issues/2280#issuecomment-476451834, or mute the thread https://github.com/notifications/unsubscribe-auth/AIAuu5kpsiXj2-0_85ufl_Qmg4Ixyt99ks5vaYhagaJpZM4OtQUb .
-- Vishal Rathod Research Scholar, Department of Computer Science and Engineering, National Institute of Technology, Karnataka. Email ID: vishalrathod.cs15f11@nitk.edu.in and vishalrathod@ieee.org
3.2- In Home directory, click (Ctrl+H) to open hidden files, and find ".bashrc" and ".profile" files. 3.3 Open those files, and add “export PATH=/home/user/msp430-47/bin:$PATH” in end of the codes. (*that Path will help the Contiki to use the tool chain.)
Don't put that "export PATH ..." line in "~/.bashrc"
. (Put it in only "~/.profile"
.)