News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Ardunio Project Help

Started by eldevstudios, June 23, 2018, 03:13:59 AM

Previous topic - Next topic

eldevstudios

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

oBFusCATed

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!]

eldevstudios

Quote from: oBFusCATed 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 ?
Using the integrated wizard.

Quote from: oBFusCATed on June 23, 2018, 09:59:25 AM
What version of arduino do you have?
Arduino Uno, however it is irrelevant in the situation.

Quote from: oBFusCATed on June 23, 2018, 09:59:25 AM
What does "didn't seem to work" mean?
Linker errors, it cannot find the specified files in the #include (s)

Quote from: oBFusCATed on June 23, 2018, 09:59:25 AM
What is the error?
Linker error;
(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

oBFusCATed

Quote from: eldevstudios on June 23, 2018, 11:00:28 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!]

eldevstudios

Quote from: oBFusCATed on June 23, 2018, 11:33:15 AM
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

eldevstudios

I downgraded to 1.0.6, still will not work.
We program in code here
Follow my instagram @eldevstudios


eldevstudios

#7
Quote from: BlueHazzard on June 23, 2018, 09:19:15 PM
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:

||=== 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:


-------------- 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.
We program in code here
Follow my instagram @eldevstudios

stahta01

And, which wizard are you now using?

QuoteDo 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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

oBFusCATed

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!]

eldevstudios

Quote from: oBFusCATed 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.

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

oBFusCATed

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!]

eldevstudios

Quote from: oBFusCATed 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.
Understandable. Any advice on where to go for the compiler error?
The only red item in the build log;

g++.exe: error: unrecognized command line option '-mmcu=atmega328p'
We program in code here
Follow my instagram @eldevstudios

stahta01

Quote from: eldevstudios on June 25, 2018, 12:45:29 AM
Quote from: oBFusCATed 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.
Understandable. Any advice on where to go for the compiler error?
The only red item in the build log;

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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

eldevstudios

Quote from: stahta01 on June 25, 2018, 01:16:37 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