arduino-uno


Serial Port not working () on Arduino in JetBrains CLion


Code works fine when tested on Arduino Uno, (editing delay(x) affects the led),
but I get this error and Serial Port Monitor does not show anything.
Error in CLion Event Log is:
Error running Unnamed: Cannot run program "C:\Users\Nikhil Verma\.CLion12\system\cmake\generated\4b320303\4b320303\Debug\summer.elf" (in directory "C:\Users\Nikhil Verma\.CLion12\system\cmake\generated\4b320303\4b320303\Debug"): CreateProcess error=193, %1 is not a valid Win32 application
CMakeLists.txt
cmake_minimum_required(VERSION 2.8.4)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/ArduinoToolchain.cmake)
set(PROJECT_NAME summer)
project(${PROJECT_NAME})
set(${CMAKE_PROJECT_NAME}_BOARD uno)
set(${CMAKE_PROJECT_NAME}_PORT COM1)
set(${CMAKE_PROJECT_NAME}_SKETCH summer.ino)
generate_arduino_firmware(${CMAKE_PROJECT_NAME})
summer.ino
#include <Arduino.h>
void setup() {
pinMode(13, OUTPUT);
Serial.begin(9600);
}
void loop() {
Serial.println("Hi");
digitalWrite(13, HIGH);
delay(7000);
digitalWrite(13, LOW);
delay(1000);
}
Configuration:
Log of Messaged Build :
"C:\Program Files (x86)\JetBrains\CLion 1.2.4\bin\cmake\bin\cmake.exe" --build "C:\Users\Nikhil Verma\.CLion12\system\cmake\generated\4b320303\4b320303\Debug" --target upload -- -j 8
[ 89%] Built target uno_CORE
[100%] Built target summer
avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude.exe: Device signature = 0x1e950f
avrdude.exe: reading input file "C:/Users/Nikhil Verma/.CLion12/system/cmake/generated/4b320303/4b320303/Debug/summer.hex"
avrdude.exe: writing flash (2370 bytes):
Writing | ################################################## | 100% 0.54s
avrdude.exe: 2370 bytes of flash written
avrdude.exe: reading input file "C:/Users/Nikhil Verma/.CLion12/system/cmake/generated/4b320303/4b320303/Debug/summer.eep"
avrdude.exe: writing eeprom (0 bytes):
Writing | ################################################## | 100% -0.00s
avrdude.exe: 0 bytes of eeprom written
avrdude.exe done. Thank you.
[100%] Built target summer-upload
[100%] Built target upload
"C:\Program Files (x86)\JetBrains\CLion 1.2.4\bin\cmake\bin\cmake.exe" --build "C:\Users\Nikhil Verma\.CLion12\system\cmake\generated\4b320303\4b320303\Debug" --target summer -- -j 8
[ 89%] Built target uno_CORE
[100%] Built target summer
CMake Toolchain:
Thanks.
Apparently you have enabled the Debug configuration in your tool, and your tool is trying to execute the Arduino Binary directly on your machine:
Error running Unnamed: Cannot run program "C:\Users\Nikhil Verma\.CLion12\system\cmake\generated\4b320303\4b320303\Debug\summer.elf" (in directory "C:\Users\Nikhil Verma\.CLion12\system\cmake\generated\4b320303\4b320303\Debug"): CreateProcess error=193, %1 is not a valid Win32 application
I suggest you to modify your IDE configuration to skip this step, and upload the code to the device instead.
EDIT: I use this approach for setting up the Makefile of all my projects, though since you are on Windows the configuration might change.

Related Links

Can't program Arduino 328P after first time use of ICSP Sparkfun AVR Pocket Programmer
Arduino uploading issue: “avrdude: no programmer has been specified on the command line or the config file”
Code is showing multiple object declaration error during multiple file compilation
arduino wifi upload google spreadsheet
How to solve error compiling an arduino sketch?
load image in the TFT lcd screen without SD card
how to send dummy data on gpio pins of arduino uno.?
Serial Port not working () on Arduino in JetBrains CLion
Error in using IF statement
Arduino not displaying results
Python ImportError: No module named yahoo_finance
Can I take solar panel's output as an input to Arduino
I cannot find UID of my Arduino
Arduino Program Reset Bug
arduino uno R3 input pins with gsm shield
Light weight machine to machine communication with Arduino

Categories

HOME
google-chrome-extension
osgi
oracle11g
pycharm
plot
hashmap
rsyslog
jgroups
installshield
pheatmap
facebook-messenger-bot
user-input
export-to-csv
messages
ups
vaadin7
dosgi
openrefine
undefined
dbext
grails3
kryo
paging
xlsxwriter
riot.js
orleans
tar
sox
microsoft-r
microsoft-sync-framework
selectedindexchanged
wpfdatagrid
virtualdub
rst2pdf
opentype
large-file-upload
file-rename
bpel
bluestacks
phonegap
uisplitview
semantic-versioning
code-contracts
amazon-kinesis-kpl
force-layout
hexo
catalog
bytecode-manipulation
dosbox
qwerty
android-fingerprint-api
opshub
node-gyp
android-mediaprojection
mime
bootstrap-dialog
import-from-excel
btrace
strptime
atomicity
jedis
boost-multi-index
dandelion
celery-task
darcs
account-kit
wdf
static-ip-address
angular-cache
home-directory
qpid
multiple-regression
lua-5.1
prettytensor
whois
unity-networking
ruby-2.2
quicklisp
cisco-ios
sortedlist
unity5.2.3
starcluster
undefined-reference
rtmfp
xsockets.net
coverflow
ruby-datamapper
opcache
html4
newtonscript
pendrive
subviews
gin
rescale
perfect-hash
audio-capture
adrotator
privilege
spec#

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App