Author Topic: Ardunio Project Help  (Read 18262 times)

Offline eldevstudios

  • Multiple posting newcomer
  • *
  • Posts: 10
  • We program in code
Ardunio Project Help
« on: June 23, 2018, 03:13:59 am »
Pretty simple I suppose...
How do I set it up?
I set the variable "arduino_dir" to "C:\Program Files (x86)\Arduino\" but that didn't seem to work.
Any help/info is appreciated!
Than you and have a nice day.
We program in code here
Follow my instagram @eldevstudios

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Ardunio Project Help
« Reply #1 on: June 23, 2018, 09:59:25 am »
Do you use the integrated wizard or the one from https://github.com/obfuscated/cb_arduino_template ?
What version of arduino do you have?
What does "didn't seem to work" mean?
What is the error?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline eldevstudios

  • Multiple posting newcomer
  • *
  • Posts: 10
  • We program in code
Re: Ardunio Project Help
« Reply #2 on: June 23, 2018, 11:00:28 am »
Do you use the integrated wizard or the one from https://github.com/obfuscated/cb_arduino_template ?
Using the integrated wizard.

What version of arduino do you have?
Arduino Uno, however it is irrelevant in the situation.

What does "didn't seem to work" mean?
Linker errors, it cannot find the specified files in the #include (s)

What is the error?
Linker error;
Code
(just path to the project files)\ardunioSafeController\cores\CDC.cpp|3|fatal error: CDC.cpp: No such file or directory|
That is just the first error. I remove this file, the rest will throw errors because the linker is unable to find the files in the search paths specified. I tried solving this, as I mentioned, by setting the "ARDUINO_DIR" variable to the Arduino IDE path. That did't work as it still throws the errors, thus "It did't seem to work."
We program in code here
Follow my instagram @eldevstudios

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Ardunio Project Help
« Reply #3 on: June 23, 2018, 11:33:15 am »
Arduino Uno, however it is irrelevant in the situation.
I'm not asking about the hardware version, but the software version.
The integrated wizard works with 1.0.x versions only, if I remember correctly.
The arduino software developers have made changes to the file layout since 1.0.x. This means that 1.5.x and newer doesn't work with the integrated wizard.
My wizard works with 1.6.9. I've not tested anything newer or older.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline eldevstudios

  • Multiple posting newcomer
  • *
  • Posts: 10
  • We program in code
Re: Ardunio Project Help
« Reply #4 on: June 23, 2018, 07:57:26 pm »
My wizard works with 1.6.9. I've not tested anything newer or older.
Software as in the IDE? I'm using the latest, which is 1.8.5
I can downgrade to 1.6.9
Also, I should mention, I am runnign Windows 8 (sadly, lol)
We program in code here
Follow my instagram @eldevstudios

Offline eldevstudios

  • Multiple posting newcomer
  • *
  • Posts: 10
  • We program in code
Re: Ardunio Project Help
« Reply #5 on: June 23, 2018, 08:26:09 pm »
I downgraded to 1.0.6, still will not work.
We program in code here
Follow my instagram @eldevstudios

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353

Offline eldevstudios

  • Multiple posting newcomer
  • *
  • Posts: 10
  • We program in code
Re: Ardunio Project Help
« Reply #7 on: June 24, 2018, 07:49:04 am »
Please post a full rebuild log as posted here: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

Literally what I have done.
The error I gave was the only error reported.
I have described the problem.
I've done nearly everything posted there.
But in a consice manner;
Codeblocks 17.12
Mingw-w64 6.2.0
Windows 8;
Problem: Code::Blocks Arduino project doesn't work; Doesn't link correctly.
What I have tried: Setting Code::Blocks' "ARDUINO_DIR" variable to the Arduino IDE; Stting System Variable "ARDUINO_DIR" to Arduino IDE; Rebuilding multiple times
Error:
Code
||=== Build: Simulator - Debug in ardunioSafeController (compiler: Mingw-w64) ===|
(Directory to folder... Irrellevant)\Programming Projects\ardunioSafeController\cores\CDC.cpp|3|fatal error: CDC.cpp: No such file or directory|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|


Log:
Code

-------------- Clean: Simulator - Debug in ardunioSafeController (compiler: Mingw-w64)---------------

Cleaned "ardunioSafeController - Simulator - Debug"

-------------- Build: Simulator - Debug in ardunioSafeController (compiler: Mingw-w64)---------------

g++.exe -Wall -fno-exceptions -ffunction-sections -fdata-sections -x c++ -s -DF_CPU=16000000L -DARDUINO=103 -DUSE_EEPROM=0 -DUSE_ETHERNET=0 -DUSE_FIRMATA=0 -DUSE_LCD=0 -DUSE_LCD4884=0 -DUSE_OBD=0 -DUSE_SD=0 -DUSE_SERVO=0 -DUSE_SOFTSERIAL=0 -DUSE_SPI=0 -DUSE_STEPPER=0 -DUSE_TINYGPS=0 -DUSE_WIRE=0 -g -DARDUSIM -DENABLE_API_NAME -D__AVR_ATmega328P__ -I. -IC:\CodeBlocks/ardusim\libraries\EEPROM -IC:\CodeBlocks/ardusim\libraries\Ethernet -IC:\CodeBlocks/ardusim\libraries\Firmata -IC:\CodeBlocks/ardusim\libraries\Flash -IC:\CodeBlocks/ardusim\libraries\LCD4884 -IC:\CodeBlocks/ardusim\libraries\LCD4Bit_mod -IC:\CodeBlocks/ardusim\libraries\LiquidCrystal -IC:\CodeBlocks/ardusim\libraries\OBD -IC:\CodeBlocks/ardusim\libraries\SD -IC:\CodeBlocks/ardusim\libraries\SD\utility -IC:\CodeBlocks/ardusim\libraries\Servo -IC:\CodeBlocks/ardusim\libraries\SevenSegment -IC:\CodeBlocks/ardusim\libraries\SoftwareSerial -IC:\CodeBlocks/ardusim\libraries\SPI -IC:\CodeBlocks/ardusim\libraries\Stepper -IC:\CodeBlocks/ardusim\libraries\TinyGPS -IC:\CodeBlocks/ardusim\libraries\Wire -IC:\CodeBlocks/ardusim\libraries\Wire\utility -IC:\CodeBlocks/ardusim\arduino\cores -IC:\CodeBlocks/ardusim\arduino\variants\standard -IC:\CodeBlocks/ardusim\include -c "C:\Users\matthew\Desktop\Programming Projects\ardunioSafeController\cores\CDC.cpp" -o obj\Debug\cores\CDC.o
C:\Users\matthew\Desktop\Programming Projects\ardunioSafeController\cores\CDC.cpp:3:19: fatal error: CDC.cpp: No such file or directory
 #include <CDC.cpp>
                   ^
compilation terminated.
Process terminated with status 1 (0 minute(s), 1 second(s))
1 error(s), 0 warning(s) (0 minute(s), 1 second(s))
 
Nothing new. Doing the same thing over and over again, changing nothing, and expecting a different result is insanity.
« Last Edit: June 24, 2018, 07:58:48 am by eldevstudios »
We program in code here
Follow my instagram @eldevstudios

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Ardunio Project Help
« Reply #8 on: June 24, 2018, 09:31:11 am »
And, which wizard are you now using?

Quote
Do you use the integrated wizard or the one from https://github.com/obfuscated/cb_arduino_template ?

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Ardunio Project Help
« Reply #9 on: June 24, 2018, 12:29:43 pm »
So, lets explain how this works: The wizard creates a file named CDC.cpp which only includes CDC.cpp. We do this because we need to include code (implementation) from arduino's sources.
And this is the easiest way. I guess we should rename the project files to something more obvious.

The problem for you is that the include search paths in the project aren't correct.
Please inspect them and then verify that in one of them there is a file CDC.cpp.
Probably there are multiple such files, you'll have to select the correct one for your device.
Repeat with the other errors.

Probably switching to my wizard might help, but it isn't really tested on windows. :(
I'll see if I can make it work with the latest arduino.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline eldevstudios

  • Multiple posting newcomer
  • *
  • Posts: 10
  • We program in code
Re: Ardunio Project Help
« Reply #10 on: June 25, 2018, 12:19:00 am »
So, lets explain how this works: The wizard creates a file named CDC.cpp which only includes CDC.cpp. We do this because we need to include code (implementation) from arduino's sources.
And this is the easiest way. I guess we should rename the project files to something more obvious.

Well I understand that much. I didn't understand why until I realized the simulation targets to not provide proper directories. I am unsure how to fix that but not going to bother trying.
I changed to the Arduino Uno target, and no linker errors, but there were compiler errors
We program in code here
Follow my instagram @eldevstudios

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Ardunio Project Help
« Reply #11 on: June 25, 2018, 12:36:27 am »
No idea about the simulation targets, I have no idea what they do. I'm not sure I've ever tested them.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline eldevstudios

  • Multiple posting newcomer
  • *
  • Posts: 10
  • We program in code
Re: Ardunio Project Help
« Reply #12 on: June 25, 2018, 12:45:29 am »
No idea about the simulation targets, I have no idea what they do. I'm not sure I've ever tested them.
Understandable. Any advice on where to go for the compiler error?
The only red item in the build log;
Code
g++.exe: error: unrecognized command line option '-mmcu=atmega328p'
We program in code here
Follow my instagram @eldevstudios

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Ardunio Project Help
« Reply #13 on: June 25, 2018, 01:16:37 am »
No idea about the simulation targets, I have no idea what they do. I'm not sure I've ever tested them.
Understandable. Any advice on where to go for the compiler error?
The only red item in the build log;
Code
g++.exe: error: unrecognized command line option '-mmcu=atmega328p'

Remove the option or use a compiler that supports that option. Did you setup the compiler tool chain correctly?

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline eldevstudios

  • Multiple posting newcomer
  • *
  • Posts: 10
  • We program in code
Re: Ardunio Project Help
« Reply #14 on: June 25, 2018, 01:27:15 am »
Remove the option or use a compiler that supports that option. Did you setup the compiler tool chain correctly?
It's the standard Mingw-w64 6.2.0 with POSIX Threads. Ithink POSIXS...
It better be set up right, otherwise something is wrong and my other projects are some sort of miraculous outcome.
Any suggestions for this "other" compiler?
We program in code here
Follow my instagram @eldevstudios