Page 1 of 2

PCAN-RS-232: How to create a firmware?

Posted: Fri 12. Nov 2021, 14:17
by PaulSch
Hi,
It's the first time I'am working with the PCAN-RS-232.
I have a question about creating firmware with Visual Studio Code. I have opened the sample files via VSCode and run the vbs script. Now I would like to create a firmware with "make all" as described in the *.txt. However, when running the command in the terminal, I get the error message:
sh: arm-none-eabi-gcc: Command not found.
make: *** [Makefile:339: gccversion] Error 127
Can anyone help me further?
Thanks a lot!

Re: PCAN-RS-232 create firmware

Posted: Fri 12. Nov 2021, 14:25
by M.Heidemann
Hello,

Thank you for your request.

Did you move the PEAK-DevPack folder or its contents after you had run the VBscript?

Please let us know

Best Regards

Marvin

Re: PCAN-RS-232 create firmware

Posted: Mon 15. Nov 2021, 08:48
by PaulSch
Hello,

i did'nt move it. I did everything like in the description.

I habe another VS-Code (Beginner) projekt where I can compile and run my C-files. Maybe it is because I've already installed compilers on my PC. But I'm very new with VS-Code....

Thank you!

Re: PCAN-RS-232 create firmware

Posted: Mon 15. Nov 2021, 08:58
by PaulSch
Hello again,

I don't know why, bu now something worked. The out-Folder was created, but when it comes to built the *bin file a new Message occured:

Creating bin file: example_echo.bin
hex2bin -s 0000 ./out/example_echo.hex
sh: hex2bin: Kommando nicht gefunden.
make: *** [Makefile:367: example_echo.bin] Fehler 127

It is a Sample-file from the Peak-Homepage.

Do you have an idea?
Best Regards
Paul

Re: PCAN-RS-232 create firmware

Posted: Mon 15. Nov 2021, 09:09
by PaulSch
One more...it works.
I only run the "make" command, not the "make all" command like in th readme.txt described.

Thank you!

The topic ca be closed.

Re: PCAN-RS-232 create firmware

Posted: Mon 15. Nov 2021, 09:29
by M.Heidemann
Hello,

Thank you for your feedback.

Using "make all" should not be an issue.

If you should have any further issues regarding this,
please try the following:

1)
Download a fresh Peak-DevPack:

https://www.peak-system.com/quick/DLP-DevPack

Extract it to a folder you have write permissions to,
for example Desktop.

2) Run the SetPath_for_VSCode.vbs script

3) Open VsCode, select "Open Folder" and open:

YourPath\PEAK-DevPack\Hardware\PCAN-RS-232\Examples\01_CAN_ECHO

Make sure you are not open "src" or any other of the sub-folders of the example.

In VsCode now use "make all" via the "Terminal" menu:
PEAK-Dev.png
PEAK-Dev.png (11.03 KiB) Viewed 23483 times
Make_All.png
Make_All.png (17.79 KiB) Viewed 23483 times
What's your output after following these steps?

Can you share a screenshot with us?

Best Regards

Marvin

Re: PCAN-RS-232 create firmware

Posted: Mon 15. Aug 2022, 13:50
by PaulSch
Hello,
sorry for my late reply. I thougt the topic was already closed.
As you mentioned, i executed the "make all" command via the "Terminal" menu.
Everything works fine. Thank you!
I am pretty new in C/C++ so i have further questions how to convert my Message to a float-Variable and then into an ASCII-Code.
For example:
I am sending "488235" (32bit) onto the CAN. I would like to send "488.235" (factor 1/1000) via RS232 to my device. But I think i will create a new topic for that. Maybe in a C/C++ forum...

Thank you!

Re: PCAN-RS-232 create firmware

Posted: Mon 15. Aug 2022, 13:54
by M.Maidhof
Hello,

yes, please contact a c/c++ forum regarding this float to char issue. This topic is not really related to our PCAN hardware.

regards

Michael

Re: PCAN-RS-232 create firmware

Posted: Mon 23. Oct 2023, 14:49
by StefKCPerformance
Hello I have the same problem, when i run the make command I get the message that the hex2bin cannot be found. And the advice you gave doesn't seem to work for me either. When I open the terminal and click "Run task" I don't see the Make button as discribed on your screenshot.

Re: PCAN-RS-232 create firmware

Posted: Mon 23. Oct 2023, 17:29
by M.Maidhof
Hi,

please follow the instructions in the readme.txt of the PEAK Dev package. Typical issue is to not execute the "SetPath_for_VSCode.vbs" or a problem that you don't open the folder (and just the folder only!) correctly.

regards

Michael