IDE with Eclipse with Jantje's plugin

Development environment specific, Arduino, Eclipse, VS2013,Em::Blocks etc
User avatar
Pito
Posts: 1529
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: IDE with Eclipse with Jantje's plugin

Post by Pito » Sun Aug 13, 2017 7:00 am

kostbill wrote:
Sat Aug 12, 2017 10:39 pm
So now I am having the following problems:

1. I cannot upload with Sloeber:
.
Issue 1. "Single click compile and J-link bin upload in Sloeber":
1-2 pages back in this thread:
http://www.stm32duino.com/viewtopic.php ... 110#p27004

load.jlink script file:
1. Adjust to your mcu type.
2. Edit the path to your .bin in active project (ie. the path into the release folder)
3. Copy the load.jlink script file into the active project folder
The only annoyance there is the fixed path in the load.jlink script pointing to your binary (so you have to edit the path when the jlink upload script is copied into a new project).
If you know how to replace it with a variable or relative path let us know.
.
Flash via Jlink in External tools 1.JPG
Flash via Jlink in External tools 1.JPG (106.33 KiB) Viewed 128 times
Flash via Jlink in External tools.JPG
Flash via Jlink in External tools.JPG (104.07 KiB) Viewed 129 times
Attachments
Flash via Jlink in External tools2.JPG
Flash via Jlink in External tools2.JPG (82.74 KiB) Viewed 128 times
Pukao Hats Cleaning Services Ltd.

kostbill
Posts: 51
Joined: Mon Aug 07, 2017 7:56 am

Re: IDE with Eclipse with Jantje's plugin

Post by kostbill » Sun Aug 13, 2017 4:25 pm

Thanks it worked!

I had to leave the si 1 there because it couldn't do it with JTAG, I don't know why.

Unfortunately I couldn't find out how to use the defined local variables for the jlink commander. I tried to set up a new variable from the external tools configuration->Environment but it didn't work.

Also at the jlink commander section of the jlink datasheet I couldn't find anything.

Perhaps the solution is to execute a batch file from the external tools configuration which will create the jlink commander script and then call the jlink.

I am not good at this, but I started something, however I cannot make the program start, so I paste the code here and you may take it and finish it if you want.

Code: Select all

@echo off

for %%* in (.) do set CurrDirName=%%~nx*
set my_path=%CD%
set my_bin_file=%my_path%\Debug\%CurrDirName%.bin

echo %my_bin_file%

set my_jlink_commander_file=%CD%\load.jlink
echo.>"%CD%\load.jlink"
echo %my_jlink_commander_file%

echo device STM32F103CB > %my_jlink_commander_file%
echo si 1 >> %my_jlink_commander_file%
echo speed 4000 >> %my_jlink_commander_file%
echo loadbin %my_bin_file%, 0x08000000 >> %my_jlink_commander_file%
echo r >> %my_jlink_commander_file%
echo g >> %my_jlink_commander_file%
echo q >> %my_jlink_commander_file%

set jlink_path=C:\Program Files (x86)\SEGGER\JLink_V618\JLink.exe
set jlink_arguments=-commanderscript ${project_loc}\load.jlink

REM THE LINE BELOW, IS THE LINE THAT I CANNOT GET WORKING.
start "" "C:\Program Files (x86)\SEGGER\JLink_V618\JLink.exe" -commanderscript ${project_loc}\load.jlink 
I am not doing this often, so I guess it is not efficient.
Let us know if you manage something.

Thanks,
Bill.

kostbill
Posts: 51
Joined: Mon Aug 07, 2017 7:56 am

Re: IDE with Eclipse with Jantje's plugin

Post by kostbill » Mon Aug 14, 2017 5:39 pm

Do you know if I cannot use Serial functions while debugging?
I am using Ozone for debugging and whenever I use a Serial function it doesn't work.

Thanks,
Bill.

User avatar
Pito
Posts: 1529
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: IDE with Eclipse with Jantje's plugin

Post by Pito » Mon Aug 14, 2017 5:58 pm

I think you can, I even did debug with SerialUSB printing out results and it worked (in Sloeber).
Try to place a breakpoint at the Serial.print() and then step over it. It should print out the result (in the terminal connected to the UART).
Pukao Hats Cleaning Services Ltd.

kostbill
Posts: 51
Joined: Mon Aug 07, 2017 7:56 am

Re: IDE with Eclipse with Jantje's plugin

Post by kostbill » Mon Aug 14, 2017 6:50 pm

I cannot do that, every time I have the Serial.begin function uncommented, it is going crazy.
When I place the breakpoint on Serial.print, it will stop there, but if I press go into, it will just step over it and output nothing.

Do you remember if you are using any configuration for the Serial port?

Also, are you using any kind of semihosting with Ozone?

kostbill
Posts: 51
Joined: Mon Aug 07, 2017 7:56 am

Re: IDE with Eclipse with Jantje's plugin

Post by kostbill » Mon Aug 14, 2017 8:46 pm

Also, when I disconnect JLink and program with the usb to serial (Arduino IDE), UART works.
But when I connect JLink and program with usb to serial, then UART is not working.

I guess it has to do with some kind of configuration, but I cannot find it.

kostbill
Posts: 51
Joined: Mon Aug 07, 2017 7:56 am

Re: IDE with Eclipse with Jantje's plugin

Post by kostbill » Mon Aug 14, 2017 9:57 pm

I removed and placed again the cables on the breadboard and it is working now.
However I am not sure this is so easily solved.
I am afraid that I may be doing something completely stupid without noticing it and I am causing the problem.

I will know if it happens again.

Thanks and I am very sorry that I bother you with all my stupid mistakes.
Bill.

Post Reply