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

Programming attiny45 chip and ir remote library
Arduino Uno: Running multiple servos
MPU 6050 SD Writing Frequency Arduino is not constant , how to have a constant writing frequency?
MPU 6050 giving values -1
P10 with Arduino, display negative/all pixels on
Arduino-uno project [closed]
Arduino digitalWrite not working in else
Shift register 74ch595 and Arduino
how to connect arduino ethernet to internet using my laptop's wifi connection
Arduino and motors
Why “fifoBuffer” values of indexes 2,3,6,7,10,11 are not passed in the teapotPacket[] array ?
Sending data from coordinator XBee(API) to router XBee(AT)
how can i add a while statement to this code for my binary game on the arduino uno
Arduino Programming in C: Why output is not the way it supposed to be?
Arduino serial port+delete key+string convert
how to connect wires of step motor 42BYGH403 to driver drv8825 pins

Categories

HOME
ms-access
magnific-popup
image-processing
session
dot
framework7
setup-deployment
sqlite3
sql-server-2016
cross-browser
pivotal-cloud-foundry
swagger-ui
portia
cross-validation
facebook-messenger-bot
vault
apache-cayenne
serilog
reactcsstransitiongroup
evopdf
pythonanywhere
flux
sms-gateway
alpine
amazonsellercentral
functional-testing
dcevm
shopware
django-storage
dynamic-featured-image
url-scheme
fgetcsv
spring-mybatis
xacml
scorm2004
code-contracts
windows-dev-center
form-data
y86
html5-fullscreen
git-merge
dartium
hot-module-replacement
hue
document.write
splice
angularjs-factory
core-plot
elmah
fakeiteasy
businessworks
avconv
apache-fop
komodoedit
jquery-nestable
theming
yii2-extension
darcs
feeds
android-cursor
media-player
windows-mobile-6.5
r-forge
sqlbulkcopy
gcsfuse
abcpdf9
setuptools
packagist
suffix-tree
independentsoft
jfugue
google-places
atk4
wordml
security-testing
emailrelay
0xdbe
dundas
sonarqube5.1.2
inmobi
sorl-thumbnail
rake-task
offloading
socketexception
openexr
wp-query
valueconverter
datagridviewcolumn
mcts
html5-notifications
quantlib-swig
ms-project-server-2010
padarn
sharp-repository
itmstransporter
dmoz
sublist
datawindow
pysimplesoap
adk
doh
zpt
hamachi
google-friend-connect
dmx512
icanhaz.js
routedevent
iweb
privilege
data-acquisition

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App