User forums > Embedded development
CB and Arduino 1.6.x
stahta01:
Try these two commands; to create the file and then try editing it. I am mainly a windows person; so, these may or may NOT work.
Tim S.
--- Code: ---mkdir -p ~/.local/share/codeblocks/templates/wizard
cp /usr/share/codeblocks/templates/wizard/config.script ~/.local/share/codeblocks/templates/wizard/config.script
--- End code ---
AZ:
--- Quote from: stahta01 on June 29, 2016, 04:32:30 am ---
--- Quote from: AZ on June 28, 2016, 04:46:04 pm ---
--- Quote from: stahta01 on June 28, 2016, 02:59:12 pm ---Are you smart enough to read the code in config.script?
Are you smart enough to add the lines inside the function RegisterWizards()?
Tim S.
--- End quote ---
Tim,
what are you trying to say?
--- End quote ---
In your prior post you basically said you deleted function X and now you get errors when you call function X.
Your post implied that you have no idea about what you are doing! Therefore, I ask what you did!
Edit: I just re-read your posts; and on Linux the file seems to be missing for you; since, I am a Windows User, I have no idea if this is normal or NOT.
I do know; I have trouble editing this file, config.script, on Windows.
FYI: The function you are calling is defined in config.script; so, when you deleted it. You broke the function!
Tim S.
--- End quote ---
You are right - i have no idea how any of these scripts work nor i have a clue about the architecture of the internal workings of CB.
I did see the call " RegisterWizard(wizProject, _T("arduino"), _T("Arduino Project"), _T("Embedded Systems"));" in the main config.script. So i removed the what i thought maybe a duplicate from the local config.script. I'm sorry if it was not clear.
Now, i saw your pull with added step 3a. It does address the issue with the "index" error. Nice work Tim!
Unfortunately, i still get the "Arduino Project has failed to load XRC resource..." warning/error and the "global variable" dialog runs wild (creates tons of windows) and eventually terminates the CB.
stahta01:
--- Quote from: AZ on June 29, 2016, 06:21:49 am ---Unfortunately, i still get the "Arduino Project has failed to load XRC resource..." warning/error and the "global variable" dialog runs wild (creates tons of windows) and eventually terminates the CB.
--- End quote ---
I get the "Arduino Project has failed to load XRC resource..." warning/error on Windows (it uses wx2.8 ); I am guessing it is a wxWidgets 2.8 issue; I have NOT had time to confirm it.
No idea why you get "global variable" dialog runs wild on Linux; I was thinking only Windows used a CB "global variable" while Linux used a linked file/directory solution.
How did you do the linked file/directory solution?
Here is my notes on what I used recently on Linux (Debian testing).
Note: I am NOT sure this code below is good or NOT.
--- Code: ---cd ~/.codeblocks
ln -s ~/sketchbook sketches
## If self built arduino IDE
cd ~/.codeblocks
ln -s ~/devel/open_source_code/version_control/arduino_ide-git/build/linux/work ~/.codeblocks/arduino
pwd # /home/stahta01/.codeblocks
## If used Debian Installer for arduino IDE
su
ln -s /usr/share/arduino /home/stahta01/.codeblocks/arduino
exit # su mode
--- End code ---
Tim S.
AZ:
--- Quote from: stahta01 on June 29, 2016, 06:36:40 am ---
--- Quote from: AZ on June 29, 2016, 06:21:49 am ---Unfortunately, i still get the "Arduino Project has failed to load XRC resource..." warning/error and the "global variable" dialog runs wild (creates tons of windows) and eventually terminates the CB.
--- End quote ---
I get the "Arduino Project has failed to load XRC resource..." warning/error on Windows (it uses wx2.8 ); I am guessing it is a wxWidgets 2.8 issue; I have NOT had time to confirm it.
No idea why you get "global variable" dialog runs wild on Linux; I was thinking only Windows used a CB "global variable" while Linux used a linked file/directory solution.
How did you do the linked file/directory solution?
Here is my notes on what I used recently on Linux (Debian testing).
Note: I am NOT sure this code below is good or NOT.
--- Code: ---cd ~/.codeblocks
ln -s ~/sketchbook sketches
## If self built arduino IDE
cd ~/.codeblocks
ln -s ~/devel/open_source_code/version_control/arduino_ide-git/build/linux/work ~/.codeblocks/arduino
pwd # /home/stahta01/.codeblocks
## If used Debian Installer for arduino IDE
su
ln -s /usr/share/arduino /home/stahta01/.codeblocks/arduino
exit # su mode
--- End code ---
Tim S.
--- End quote ---
> How did you do the linked file/directory solution?
I followed the read.me to the dot.
here is what i have :
--- Code: ---[az@toshiba wizard]$ pwd
/home/az/.local/share/codeblocks/templates/wizard
[az@toshiba wizard]$ ls -la
total 20
drwxr-xr-x 2 az az 4096 Jun 29 00:03 .
drwxr-xr-x 3 az az 4096 Jun 17 16:56 ..
lrwxrwxrwx 1 az az 41 Jun 29 00:03 arduino -> /home/az/work/Arduino/cb_arduino_template
-rw-r--r-- 1 az az 6258 Jun 29 00:02 config.script
ls -la /home/az/.local/share/codeblocks/
total 24
drwxr-xr-x 5 az az 4096 Jun 26 13:05 .
drwxr-xr-x. 19 az az 4096 Jun 29 00:17 ..
drwxr-xr-x 2 az az 4096 Apr 16 00:12 plugins
drwxr-xr-x 2 az az 4096 Apr 16 00:12 scripts
drwxr-xr-x 3 az az 4096 Jun 17 16:56 templates
--- End code ---
all dirs but "templates" are empty.
I don't have any links to sketches.
To avoid recreation of the dialog i have to click "NO" as many time as it pops up. And managed to set the directory and save that. If i'm lucky i get the CB working fine, if not - "process terminated"
stahta01:
I see your problem; somewhere recently he changed the Wizard to use an CB "Global Variable" instead of Linking file/folder solution; but, I did NOT do that change on Linux.
(But, I forgot if I tested the wizard on Linux or not after he asked.)
I will see what the Global Variable is supposed to be.
The base location of the Global Variable needed to be "/home/stahta01/devel/open_source_code/version_control/arduino_ide-git" for me.
( I just tested this location "/home/stahta01/devel/open_source_code/version_control/arduino_ide-git/build/linux/work" and it also worked for me.)
--- Code: ---ls /home/stahta01/devel/open_source_code/version_control/arduino_ide-git
--- End code ---
The results of the above list needs to contain at least the folders "hardware" and "libraries".
My folders below.
--- Quote ---app arduino-core build examples_formatter.conf format.every.sketch.sh hardware libraries lib_sync license.txt README.md work
--- End quote ---
In doing my solution I had to edit an header search path in the Wizard created project
from "$(ARDUINO_DIR)/hardware/arduino/avr/libraries/HID/src"
to "$(ARDUINO_DIR)/hardware/arduino/avr/libraries/HID"
Sorry, about the confusion; I missed when he did the change to Global Variable under Linux.
To create a CB "Global Variable" use
Setting -> "Global Variables ..."
Click on "New" (By the current variable) enter "arduino" for the name of the variable.
I have attached an image of the window below.
Tim S.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version