energia / Energia

Fork of Arduino for the Texas Instruments LaunchPad's
http://energia.nu
Other
798 stars 670 forks source link

expected primary-expression before ',' token #960

Closed oTijWi closed 7 years ago

oTijWi commented 7 years ago

here is my code -

#define LED void setup() { pinMode( LED , OUTPUT); } void loop() { digitalWrite( LED , HIGH); // turn the LED on by making the LED pin HIGH delay(100000); // wait for a second digitalWrite( LED , LOW); // turn the LED off by making the pin LOW delay(100000); // wait for a second }

& ERRORS ->

Energia: 1.6.10E18 (Windows 10), Board: "MSP-EXP430G2553LP"

:0:12: warning: missing whitespace after the macro name [enabled by default] C:\Users\user\Desktop\desk\Energia\Sidekick_LaunchPad\EXAMPLE00_Blink\EXAMPLE00_Blink.ino: In function 'void setup()': EXAMPLE00_Blink:4: error: expected primary-expression before ',' token C:\Users\user\Desktop\desk\Energia\Sidekick_LaunchPad\EXAMPLE00_Blink\EXAMPLE00_Blink.ino: In function 'void loop()': EXAMPLE00_Blink:8: error: expected primary-expression before ',' token EXAMPLE00_Blink:10: error: expected primary-expression before ',' token exit status 1 expected primary-expression before ',' token This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. need HELP!!
rei-vilo commented 7 years ago

Take the full Blink example with the complete line #define LED RED_LED, including RED_LED. You line is missing RED_LED.

Please use the 43oh forum for project related questions.

#define LED RED_LED

void setup() {                
  pinMode(LED, OUTPUT);     
}

void loop() {
  digitalWrite(LED, HIGH);
  delay(1000);              
  digitalWrite(LED, LOW);
  delay(1000);              
}
oTijWi commented 7 years ago

problem01

now, this problem!!!

C:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\tools\msp430/bin/msp430-ar: unable to rename 'core\core.a'; reason: Permission denied

exit status 1 Error compiling for board MSP-EXP430G2553LP.

oTijWi commented 7 years ago

Please... help as soon as possible.

rei-vilo commented 7 years ago

Isn't the desktop write-protected in Windows?

robertinant commented 7 years ago

I have not seen this problem before. Can you please try the following?

oTijWi commented 7 years ago
C:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\arduino-builder -compile -logger=machine -hardware "C:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware" -tools "C:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\tools-builder" -tools "C:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\tools\msp430" -built-in-libraries "C:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\libraries" -libraries "C:\Users\user\Documents\Energia\libraries" -fqbn=energia:msp430:MSP-EXP430G2553LP -ide-version=10610 -build-path "C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\user\Desktop\desk\Energia\Sidekick_LaunchPad\Sidekick_LaunchPad\EXAMPLE00_Blink\EXAMPLE00_Blink.ino"
Using board 'MSP-EXP430G2553LP' from platform in folder: C:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\energia\msp430
Using core 'msp430' from platform in folder: C:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\energia\msp430
Detecting libraries used...
"C:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\tools\msp430/bin/msp430-g++" -c -g -O2  -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=msp430g2553 -DF_CPU=16000000L -DARDUINO=10610 -DENERGIA=10610 -DENERGIA_MSP-EXP430G2553LP -DENERGIA_ARCH_MSP430 -IC:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\tools\msp430/include  "-IC:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\energia\msp430\cores\msp430" "-IC:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\energia\msp430\variants\MSP-EXP430G2553LP" "C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\sketch\EXAMPLE00_Blink.ino.cpp" -o "nul"
"C:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\tools\msp430/bin/msp430-g++" -c -g -O2  -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=msp430g2553 -DF_CPU=16000000L -DARDUINO=10610 -DENERGIA=10610 -DENERGIA_MSP-EXP430G2553LP -DENERGIA_ARCH_MSP430 -IC:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\tools\msp430/include  "-IC:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\energia\msp430\cores\msp430" "-IC:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\energia\msp430\variants\MSP-EXP430G2553LP" "C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\sketch\EXAMPLE00_Blink.ino.cpp" -o "nul"
Generating function prototypes...
"C:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\tools\msp430/bin/msp430-g++" -c -g -O2  -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=msp430g2553 -DF_CPU=16000000L -DARDUINO=10610 -DENERGIA=10610 -DENERGIA_MSP-EXP430G2553LP -DENERGIA_ARCH_MSP430 -IC:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\tools\msp430/include  "-IC:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\energia\msp430\cores\msp430" "-IC:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\energia\msp430\variants\MSP-EXP430G2553LP" "C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\sketch\EXAMPLE00_Blink.ino.cpp" -o "C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\tools-builder\ctags\5.8-arduino10/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\tools\msp430/bin/msp430-g++" -c -g -O2  -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=msp430g2553 -DF_CPU=16000000L -DARDUINO=10610 -DENERGIA=10610 -DENERGIA_MSP-EXP430G2553LP -DENERGIA_ARCH_MSP430 -IC:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\tools\msp430/include  "-IC:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\energia\msp430\cores\msp430" "-IC:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\energia\msp430\variants\MSP-EXP430G2553LP" "C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\sketch\EXAMPLE00_Blink.ino.cpp" -o "C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\sketch\EXAMPLE00_Blink.ino.cpp.o"
Compiling libraries...
Compiling core...
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\WInterrupts.c.o
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\atof.c.o
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\itoa.c.o
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\random.c.o
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\twi.c.o
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\twi_sw.c.o
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\usci_isr_handler.c.o
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\wiring.c.o
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\wiring_analog.c.o
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\wiring_digital.c.o
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\wiring_pulse.c.o
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\wiring_shift.c.o
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\avr\dtostrf.c.o
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\HardwareSerial.cpp.o
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\IPAddress.cpp.o
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\MACAddress.cpp.o
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\Print.cpp.o
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\Stream.cpp.o
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\TimerSerial.cpp.o
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\Tone.cpp.o
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\WMath.cpp.o
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\WString.cpp.o
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\Wire.cpp.o
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\main.cpp.o
Using previously compiled file: C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\new.cpp.o
"C:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\tools\msp430/bin/msp430-ar" rcs  "C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\core.a" "C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\WInterrupts.c.o"
"C:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\tools\msp430/bin/msp430-ar" rcs  "C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\core.a" "C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\atof.c.o"
"C:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\tools\msp430/bin/msp430-ar" rcs  "C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\core.a" "C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\itoa.c.o"
"C:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\tools\msp430/bin/msp430-ar" rcs  "C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\core.a" "C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\random.c.o"
"C:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\tools\msp430/bin/msp430-ar" rcs  "C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\core.a" "C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\twi.c.o"
C:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\tools\msp430/bin/msp430-ar: unable to rename 'C:\Users\user\AppData\Local\Temp\build530c262522cbfcd5f8692c0ec053a60a.tmp\core\core.a'; reason: File exists

exit status 1
Error compiling for board MSP-EXP430G2553LP.
oTijWi commented 7 years ago

again getting a problem, but this time, reason is changed.

rei-vilo commented 7 years ago

This seems to be a second compilation, not a fresh one.

Please close Energia, relaunch it, create a new project with Blink example, compile.

oTijWi commented 7 years ago

hey, rei-vilo. I didn't get what you were saying. will you be more specific?

oTijWi commented 7 years ago

same problem again :--

C:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\tools\msp430/bin/msp430-ar: unable to rename 'C:\Users\user\AppData\Local\Temp\build6bdd3e6f9b1f6496b4adec1c9457df9c.tmp\core\core.a'; reason: Permission denied

exit status 1
Error compiling for board MSP-EXP430G2553LP.
rei-vilo commented 7 years ago

There seems to be an issue with folder permissions.

oTijWi commented 7 years ago

I'm using windows 10. about the installation of energia, I didn't do it. actually, I've got a zip file for it which was having energia preinstalled.

rei-vilo commented 7 years ago

Perform a check of your disk and repair files permissions.

oTijWi commented 7 years ago

can you guide me, how to do that?

rei-vilo commented 7 years ago

GIYF

https://support.microsoft.com/en-us/help/17590/automatically-diagnose-and-repair-windows-file-and-folder-problems

oTijWi commented 7 years ago

Again having the same problem

C:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\tools\msp430/bin/msp430-ar: unable to rename 'C:\Users\user\AppData\Local\Temp\build31e818c65d9c7a19f0d6d43124a20cd2.tmp\core\core.a'; reason: Permission denied

exit status 1 Error compiling for board MSP-EXP430G2553LP.

oTijWi commented 7 years ago

Maybe it is because I haven't installed Energia manually, But, I couldn't get to download the set up for it. it is available in ZIP form to download.

rei-vilo commented 7 years ago

So this is an issue with Windows, not Energia per se. See https://support.microsoft.com/en-us/help/2623670/-access-denied-or-other-errors-when-you-access-or-work-with-files-and-folders-in-windows

Ok, now try to launch Energia with Administrator privilege.

oTijWi commented 7 years ago

again the same problem ..... :(

C:\Users\user\Desktop\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\tools\msp430/bin/msp430-ar: unable to rename 'C:\Users\user\AppData\Local\Temp\build99cc971bd16d54daa628c37bf2ac45d8.tmp\core\core.a'; reason: File exists

exit status 1 Error compiling for board MSP-EXP430G2553LP.

oTijWi commented 7 years ago

this time, it isn't saying about the permission. but the reason is changed. now the error is because of the existence of a file. Don't know what to do now.

rei-vilo commented 7 years ago

Delete the file C:\Users\user\AppData\Local\Temp\build99cc971bd16d54daa628c37bf2ac45d8.tmp\core\core.a or the folder C:\Users\user\AppData\Local\Temp\build99cc971bd16d54daa628c37bf2ac45d8.tmp.

rei-vilo commented 7 years ago

Maybe you'd be luckier if you post your issue on the 43oh forum. Other users may have faced with this issue and found solutions before. I can't manage to replicate it on my Windows 10-based laptop.

oTijWi commented 7 years ago

I've been trying to get this issue on 43oh, but there is a question I need to answer to get registered. What is the name of TI's flagship development kit for makers?

when I'm filling the name of the msp430 launchpad it is again asking me for a correct answer. so, couldn't post it on that forum unless I register on that.

rei-vilo commented 7 years ago

I guess it is launchpad.

rei-vilo commented 7 years ago

And what about

Delete the file C:\Users\user\AppData\Local\Temp\build99cc971bd16d54daa628c37bf2ac45d8.tmp\core\core.a or the folder C:\Users\user\AppData\Local\Temp\build99cc971bd16d54daa628c37bf2ac45d8.tmp.