Show Posts
Pages: 1 [2]
16  Products / Arduino Due / Re: No device found on COM5 with Bossac on Winwdows 7 on: January 08, 2013, 04:24:05 pm
Oh sorry !

I made ​​a mistake in this post.
In fact my command line is:

Code:
C:\ARM\arduino-1.5.1r2\hardware\tools\bossac.exe --port=COM5 -U false -e -w -v -b C:\Users\Me\AppData\Local\Temp\build8940831537078293554.tmp\Blink.cpp.bin -R

I try to add 2 options -d et the messages displayed are :
Code:
Send auto-baud
Set binary mode
No device found on COM5

I don't understand why this command line doesn't work...

Nassa.

17  Products / Arduino Due / Re: [Q]: Tailoring the Due to Eclipse.. on: January 08, 2013, 03:48:19 pm
Clean your ArduinoDueCore project :
- clean ArduinoDueCore project
- in the "Problems" tab right click on the root errors node, when the popup is open, click on "Delete" item. You can do the same for warnings.
- bluid ArduinoDueCore.

Build MyProject.


Nassa.
18  Products / Arduino Due / No device found on COM5 with Bossac on Winwdows 7 on: January 08, 2013, 03:40:54 pm
Hi all !

I tried to upload a program in my Arduino Due with Bossac, but it does not work.

My command line is as follows:
Code:
C:\ARM\arduino-1.5.1r2\hardware\tools\bossac.exe -port=COM5 -U false -e -w -v -b C:\Users\Me\AppData\Local\Temp\build8940831537078293554.tmp\Blink.cpp.bin -R

Bossac displays the following message:
Code:
No device found on COM5

However, whenever I run the command line, the TX LED blink for about one second.

I work under Windows 7 and I use bossac.exe provided with Arduino Due IDE.

When I use the Arduino IDE Due, on COM5 there is no problem. But the command line I get the message "No device found on COM5".

I do not understand what happens !

I uplaod successful program only 2 times only with the command line.

Thank you for your help.

Nassa.
19  Products / Arduino Due / Re: [Q]: Tailoring the Due to Eclipse.. on: January 08, 2013, 02:44:15 pm
The processor Define is :
__SAM3X8E__
and not
_SAM3X8E_
There is 2 underscore before and 2 underscore after.

Could you verify ?

And let me know please.

Nassa.
20  Products / Arduino Due / Re: [Q]: Tailoring the Due to Eclipse.. on: January 08, 2013, 02:10:25 pm
Hi Joppuh,

I do not think your problem is not OSX.
In my opinion, there are two possibilities :

Either you forgot one of the 3 defines :
__SAM3X8E__
USB_PID=0x003E
USBCON

Either you forgot an include path or one or more files are missing.

Warning, and include Defines Path must be set in the configuration C and C+ + (Tool Settings) :
ARM Sourcery Windows GCC C Compiler
and
ARM Sourcery Windows GCC C + + Compiler

Let me known please.

Nassa.
21  Products / Arduino Due / Re: [Q]: Tailoring the Due to Eclipse.. on: January 06, 2013, 02:17:30 pm
Hi Dabbede,

For the #5 and #7 steps the correct sentence is :
Same setting for “ARM Sourcery Windows GCC C++ Compiler/Directories” and “ARM Sourcery Windows GCC C Compiler/Directories”, and click on “OK”

On the size of the binary, I think there is one or more embedded library are unnecessary. I can verify that.

When I wrote this compilation method for Eclipse, I had no Arduino Due Board. I have not tested.
Today I have an Arduino Due board but the command line Bossac for download only function 1 in 50 on my PC and I do not understand why.
I must first solve this problem.

Thanks for your test.

Nassa.
22  Products / Arduino Due / Re: [Q]: Tailoring the Due to Eclipse.. on: December 17, 2012, 10:31:15 am
Hi Graynomad,

Thanks for your message.
Yes, I spent a lot of time, it was not easy.
For example how to uplaod a program in the board.
I used the Arduino IDE Due, I have compiled a sample program and I clicked on upload button.
As I do not have Arduino Due board, the Arduino Due IDE displays the following message: "No device found on COM3".
I did a search for text "No device found on" in the folder of the Arduino Due IDE, and I found the file bossac.exe.
I replaced this file with a small program that just prints on the stdout the arguments that are get in parameter.
I clicked on upload button on the Arduino Due IDE, and the parameter are displayed in the Arduino IDE.
In this way I got the list of parameters to use with bossac.exe.

I make an improvement on a tool chain path configuration described on the #2 Step.

If like me, you use different board with different toolchain (AVR, Teensy 3.0, Arduino Due...), you will need to modify the PATH environment variable in Windows depending on the board you are using. It is heavy!
In Eclipse, it is possible to configure environment variable to a workspace and therefore no need to change the Winwdows PATH environment variable :

-   Set the tool chain path, click in “Windows/Preferences”.
-   In the tree area in the left of “Preferences” dialog box, select “C C++/Build/Environment”.
-   On “Preferences/Environment” clicks on the “select…” button.
-   In the “Select variables” dialog box, enable checkbox of “Path” item, and click on the “OK” button.
-   Back on the “Preferences/Environment” select the “Path” item added, and click on the “Edit…” button.
-   In the “Edit variables” dialog box, add the tool chain path “C:\arduino-1.5.1r2\hardware\tools\g++_arm_none_eabi\bin” without remove the current path values, and click on the “OK” button.
-   In the “Preferences/Environment” click on the “OK” button.

Good luck

Nassa.
23  Products / Arduino Due / Re: [Q]: Tailoring the Due to Eclipse.. on: December 16, 2012, 02:46:17 pm
Hi,

I found the solution to upload your programs with Eclipse.
The Arduino IDE uses Bossa Due flash programming for ARM http://www.shumatech.com/web/products/bossa

How to configure Eclipse:

#8. Aduino Due program loader settings:
-   In Eclipse, on the menu “Run/External Tools/External Tools Configurations…”
-   In the dialog box select on the “Program” item in the tree area, and click on the “New launch configuration” icon.
-   In the “Name” field, type “Arduino Due”.
-   In the “Main” tab, in the “Location” field, type the path: “C:\arduino-1.5.1r2\hardware\tools\bossac.exe”.
-   In the “Arguments” field, type : “--port=COM3 -U false -e -w -v -b ${project_path}\Release\${project_name}.hex -R”
-   Warning, the port argument value is “COM3” change this value if your board is connected on another Com Port.
-   In the “Common” tab, enable the checkbox “External Tools”, and click on the “Apply” button.

#9. Upload program to the Arduino Due board:
-   In Eclipse, select your project, “MyProject”.
-   Click on the button “Run Arduino Due” of the tools bar to start Bossa loader. For example: http://ekawas.blogspot.fr/2009/04/google-app-engine-eclipse.html

#10. Connect the terminal to the Arduino Due board:
-   Modify your main.cpp file :

Code:
#define ARDUINO_MAIN
#include "Arduino.h"

#ifdef USB_SERIAL
usb_serial_class Serial;
#endif

int main(void) {
init();

delay(1);

#if defined(USBCON)
USBDevice.attach();
#endif

Serial.begin(38400);
pinMode(13, OUTPUT);

for (;;) {
digitalWrite(13, HIGH);
Serial.println("Hello World");
delay(50);
digitalWrite(13, LOW);
delay(950);
}
}

-   Compile and upload this program.
-   To open the terminal view, click on the menu “Window/Show View/Other…”.
-   In the “Show View” dialog box, in the tree area, select “Terminal/Terminal” and click on the “OK” button.
-   In the Terminal view, click on the “Settings” icon to open the “Terminal Settings” dialog box.
-   Type “Arduino Due” on the “View Title”, select “Serial” “Connection Type” select box, select the “Port”, select the “Baud Rate” to 38400 and click on the “OK” button.
-   Click on the “Connect” button, the “Hello Word” message appears every second.

Good Luck !
Nassa.
24  Products / Arduino Due / Re: [Q]: Tailoring the Due to Eclipse.. on: December 15, 2012, 03:54:20 pm
... Next part :

#5. ArduinoDueCore library project Settings:
-   In Eclipse, click on the project with right mouse button, click on the “Properties” item.
-   Select “C/C++ Build/Settings” in the tree area on the left.
-   In the “Tool Settings” tab, in “Target Processor” select “cortex-m3” value of “Processor” property and enable the “Thumb” checkbox.
-   Select “ARM Sourcery Windows GCC C Compiler/Preprocessor”, in the “Defined symbols” area, adds the following items:
-   __SAM3X8E__
-   USB_PID=0x003E
-   USBCON
-   Select “ARM Sourcery Windows GCC C Compiler/Directories”, in the “Include paths” area, add the followings items: (using the “Workspace…” button)
-   “\src\core”.
-   “\src\lib\CMSIS\Device\ATMEL”.
-   “\src\lib\CMSIS\CMSIS\Include”.
-   “\src\lib\libsam\include”.
-   “\src\lib\libsam”.
-   “\src\lib\CMSIS\Device\ATMEL\sam3xa\include”.
-   “\src\lib\variants\arduino_due_x”.
-   Same setting for “ARM Sourcery Windows GCC C++ Compiler/Preprocessor” and “ARM Sourcery Windows GCC C Compiler/Directories”, and click on “OK” button.
-   To build the ArduinoDueCore library, click on the project with right mouse button, click on the “Build Project” item. In the “Release” folder, the “libArduinoDueCore.a” file has been generated.

#6. Create your Arduino Due project:
-   In Eclipse, create a project, click on menu File/New/C++ Project.
-   In the dialog box “C++ Project”, type the Project Name: “MyProject”.
-   In the “Project type” area, select “ARM Cross Target Application/Empty Project”.
-   In the “Toolchains” area, select “ARM Windows GCC (Sourcery)”.
-   Click on the “Next” button.
-   On the Configuration area disable the “Debug” checkbox.
-   Click on the “Finish” button.
-   Create a “src” folder in project, click on the project with right mouse button, click on “New/Folder” item of popup menu. Type “src” in “Folder name” field and click on the “Finish” button.
-   With Windows Explorer select “main.cpp” and “syscalls_sam3.c” files in the “C:\arduino-1.5.1r2\hardware\arduino\sam\cores\arduino\” folder and copy to the “src” folder of the “MyProject” project.
-   In Eclipse Modify main.cpp :

Code:
#define ARDUINO_MAIN
#include "Arduino.h"

#ifdef USB_SERIAL
usb_serial_class Serial;
#endif

int main(void) {
init();

delay(1);

#if defined(USBCON)
USBDevice.attach();
#endif

pinMode(13, OUTPUT);

for (;;) {
digitalWrite(13, HIGH);
delay(50);
digitalWrite(13, LOW);
delay(950);
}
}

-   In Eclipse, click on the project with right mouse button, click on the “Refresh” item.
-   The “src” folder appears with its files.

#7. MyProject project Settings:
-   In Eclipse, click on the project with right mouse button, click on the “Properties” item.
-   Select “C/C++ Build/Settings” in the tree area on the left.
-   In the “Tool Settings” tab, in “Target Processor” select “cortex-m3” value of “Processor” property and enable the “Thumb” checkbox.
-   Select “ARM Sourcery Windows GCC C Compiler/Preprocessor”, in the “Defined symbols” area, adds the following items:
-   __SAM3X8E__
-   USB_PID=0x003E
-   USBCON
-   Select “ARM Sourcery Windows GCC C Compiler/Directories”, in the “Include paths” area, add “src” folder of “ArduinoDueCore” : (using the “Workspace…” button)
-   “ArduinoDueCore/src/core”
-   “ArduinoDueCore/src/lib/libsam”
-   “ArduinoDueCore/src/lib/CMSIS/Device/ATMEL”
-   “ArduinoDueCore/src/lib/variants/arduino_due_x”
-   “ArduinoDueCore/src/lib/CMSIS/CMSIS/Include”
-   “ArduinoDueCore/src/lib/CMSIS/Device/ATMEL/sam3xa/include”
-   Same setting for “ARM Sourcery Windows GCC C++ Compiler/Preprocessor” and “ARM Sourcery Windows GCC C Compiler/Directories”, and click on “OK” button.
-   Select “ARM Sourcery Windows GCC C++ Linker/General”, in the “Script file” field, clicks on the “Browse…” and select “ArduinoDueCore\src\lib\variants\arduino_due_x\linker_scripts\gcc\flash.ld” file, folder of MyProject.
-   Select “ARM Sourcery Windows GCC C++ Linker/Library”, in the “Libraries” area, adds “ArduinoDueCore” and in “Library search path” area, adds the path where the ArduinoDueCore library is located, use the “Workspace…” button and select the “Release” folder of ArduinoDueCore library project.
-   Select “Project References”, in the “Project references for ‘MyProject’” enable the “ArduinoDueCore” checkbox.
-   To build your project, click on the project with right mouse button, click on the “Build Project” item. In the “Release” folder, the “MyProject.hex” file has been generated.


Good Luck !

Nassa.
25  Products / Arduino Due / Re: [Q]: Tailoring the Due to Eclipse.. on: December 15, 2012, 03:51:28 pm
Hi Ricky !

I wrote a procedure to use Eclipse with Arduino Due board.
This procedure is written for Winwdows, but you can adapt it to Linux if you want.
But the problem is that I don't now what software to use to uplaod the program in Arduino Due board ...
I can't do test because I don't have Arduino Due board.

Eclipse installation for Arduino Due on Windows

Introduction
This manual is written for Arduino Due IDE.
This manual will allow you install an Eclipse environment to edit and compile your programs but also to communicate with your Arduino Due Board with USB (serial) and a terminal.
This is not a definitive solution, but works very well.

#1. You must first download the following elements:
-   Arduino Due IDE : http://arduino.cc/en/Main/SoftwareDue
-   Elicpe IDE for C/C++ Developers Juno SR1 32 bits (64 bits is not compatible with RXTX plug-in) : http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/junosr1
-   GNU ARM Eclipse Plug-in : http://sourceforge.net/projects/gnuarmeclipse/files/Current%20Releases/0.5.4/
-   TM-terminal 3.4.1 : http://www.eclipse.org/downloads/download.php?file=/tm/downloads/drops/R-3.4.1-201209191030/TM-terminal-3.4.1.zip

#2. Installation:
-   Unzip Arduino Due IDE, for example: “C:\arduino-1.5.1r2”.
-   Unzip Eclipse IDE for C/C++, for example: “C:\ArduinoDue\eclipse”.
-   Add Arduino tool chain path in the Windows Path: “C:\arduino-1.5.1r2\hardware\tools\g++_arm_none_eabi\bin”.

#3. Configuration:
-   Start Eclipse and install the GNU ARM Eclipse Plug-in, click on menu “Help/Install New Software…”
-   In the dialog box “Install”, click on “Add” button.
-   In the “Add Repository” dialog box, click on “Archive…” button.
-   In the this dialog box, select the downloaded plug-in file : “org.eclipse.cdt.cross.arm.gnu_0.5.4.201202210114.zip”
-   In the dialog box “Install”, click on “Add” button.
-   In the “Add Repository” dialog box, type “RXTX” in the “Name” field and type http://rxtx.qbang.org/eclipse/ in the “Location” field and click on the “Ok” button.
-   With Windows Explorer, create a new folder “TM” in the “C:\ArduinoDue\eclipse\dropins” folder.
-   Copy “TM-trminal-3.4.1.zip” file in the “TM” folder, and unzip this file in this folder. Restart Eclipse.

#4. Create the ArduinoDueCore library Project:
-   In Eclipse, create a project, click on menu “File/New/C++ Project”.
-   In the dialog box “C++ Project”, type the Project Name : “ArduinoDueCore”
-   Disable, “Use default location” checkbox.
-   Click on the “Browse” button and select the location of your project.
-   In the “Project type” area, select “ARM Cross Target Static Library/Empty Project”.
-   In the “Toolchains” area, select “ARM Windows GCC (Sourcery G++ Lite)”.
-   Click on the “Next” button.
-   On the Configuration area disable the “Debug” checkbox.
-   Click on the “Finish” button.
-   Check the project, click on the project with right mouse button, in the popup window, click on the “Properties” item.
-   In the tree area in the left of dialog box, select “C/C++ General/Paths and Symbols”
-   Verify in the “Includes” tab than “Include directories” are filled with the path based added in the Windows Path (in step #2) on the Assembly, GNU C, GNU C++ languages. If the path is not correctly set, you must verify that the path has been correctly set.
-   Click on the “Cancel” button to close the dialog box.
-   Create a “src\core” folder in project, click on the project with right mouse button, click on “New/Folder” item of popup menu. Type “src\core” in “Folder name” field and click on the “Finish” button.
-   With Windows Explorer select all files in the “C:\arduino-1.5.1r2\hardware\arduino\sam\cores\arduino” folder and copy to the “src\core” folder of the “ArduinoDueCore” project.
-   In the “src\core” folder, remove “main.cpp” and “syscalls_sam3.c” files.
-   In the “src” folder create “lib” folder.
-   From the “C:\arduino-1.5.1r2\hardware\arduino\sam\system\” folder copy the followings folders and files to the “src\lib” project folder:
-   “CMSIS\CMSIS\Include\*.h” (with all the include files).
-   “CMSIS\Device\ATMEL\” with the include files : “sam3.h”, “sam.h”.
-   “CMSIS\Device\ATMEL\sam3xa\include\component\*.h” (with all the include files).
-   “CMSIS\Device\ATMEL\sam3xa\include\instance\*.h” (with all the include files).
-   “CMSIS\Device\ATMEL\sam3xa\include\pio\pio_sam3x8e.h”.
-   “CMSIS\Device\ATMEL\sam3xa\include\” with the include files: “sam3x8e.h”, “sam3xa.h”, “system_sam3xa.h”.
-   “CMSIS\Device\ATMEL\sam3xa\source\gcc_atmel \startup_sam3xa.c”.
-   “CMSIS\Device\ATMEL\sam3xa\source\system_sam3xa.c”.
-   “libsam\include\*.h”.
-   “libsam\source\*.c”.
-   “libsam\ship.h”.
-   From the “C:\ARM\arduino-1.5.1r2\hardware\arduino\sam” folder copy the followings folders and files to the “src\lib” project folder:
-   “variants\arduino_due_x\linker_scripts\gcc\flash.ld”.
-   “variants\arduino_due_x\linker_scripts\” with the files: “pins_arduino.h”, “variant.cpp”, “variant.h”.
-   In Eclipse, click on the project with right mouse button, click on the “Refresh” item.
-   The “src\core” and “src\lib” folders appear with its files and the sub folders and others source code files…

Following the next post...
26  Products / Arduino Due / Re: [Q]: Tailoring the Due to Eclipse.. on: December 11, 2012, 03:19:15 pm
Hi Ricky,

This weekend, I wrote a manual for the Board Teensy 3.0 (*) (compatible with Arduino IDE) to compile in Eclipse. The Board Teensy 3.0 is based on an ARM processor like Arduino Due : http://forum.pjrc.com/threads/1474-Anyone-using-Eclipse-for-development

If you want I can try to find a solution for Arduino Due ?
But I could not test the complied binary file because I did not Arduino Due Board.

Does it make you interested ?

* The Board Teensy 3.0:
http://www.kickstarter.com/projects/paulstoffregen/teensy-30-32-bit-arm-cortex-m4-usable-in-arduino-a?ref=live
http://www.pjrc.com/teensy/

Bye.

Nassa.
27  Products / Arduino Due / Re: [Q]: Tailoring the Due to Eclipse.. on: December 07, 2012, 08:19:50 am
Hello Ricky,

It is possible to compile the source code Arduino framework with your program in Atmel Studio.

Bye.

Nassa.
28  Products / Arduino Due / Re: [Q]: Tailoring the Due to Eclipse.. on: December 06, 2012, 06:12:01 pm
Hi Ricky,

I have not yet purchased the Arduino Due but I'm also interested in using Eclipse with Arduino Due board in the futur.
I installed Atmel Studio 6.0 (it's free) there is the possibility of creating a project Arduino Due with (Atmel Software Framework : ASF). I know this is not what you want but it is better than the Arduino IDE.
You can download it here : http://www.atmel.com/tools/atmelstudio.aspx

Good luck.

Bye.

Nassa.
29  Using Arduino / General Electronics / Re: How to work the external power supply management ? on: June 07, 2011, 07:45:57 am
Hi Grumpy Mike,

Ok, I understood !
When the GATE_CMD is on 0V then the Ugs is -5V.
the FET threshold is reach.

Thanks very much.
30  Using Arduino / General Electronics / How to work the external power supply management ? on: June 07, 2011, 04:51:32 am
Hi,

I would like to know, how work the operational amplifier connected (LM358D) to the P-Channel MOSFET transistor (FDN304V)

This part of Arduino board is used to connect the regulator (5V) to USB VCC, when external power supply is connected on the Arduino board.

   ---> http://arduino.cc/en/uploads/Main/arduino-uno-schematic.pdf

The LM358D is a voltage comparator :
CMP  : on pin 3 of LM358D (+ input)
+3V3 : on pin 2 of LM358D (- input)
GATE_CMD  : pin 1 of LM358D (output)

With CMP = (VIN / 2)
   CMP > +3V3  :  GATE_CMD = +5V
   CMP < +3V3  :  GATE_CMD = 0V

   ---> http://fr.wikiversity.org/wiki/Amplificateur_op%C3%A9rationnel/Comparateur

The P-Channel MOSFET transistor (FDN304V) needs a negative Gate Threshold Voltage.

   ---> http://www.adrirobot.it/datasheet/transistor/pdf/FDN304P.pdf

But the LM538D output connected on the Gate of this transistor (GATE_CMD) is between 0V to +5V but a never negative value !


I don’t know how it is work…

Thanks

Nassa.
Pages: 1 [2]