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

Programmable Converter for RS-232 to CAN
PaulSch
Posts: 5
Joined: Fri 12. Nov 2021, 13:49

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

Post by PaulSch » Fri 12. Nov 2021, 14:17

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!

M.Heidemann
Sales & Support
Sales & Support
Posts: 1083
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN-RS-232 create firmware

Post by M.Heidemann » Fri 12. Nov 2021, 14:25

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
---
Marvin Heidemann
PEAK-Support Team

PaulSch
Posts: 5
Joined: Fri 12. Nov 2021, 13:49

Re: PCAN-RS-232 create firmware

Post by PaulSch » Mon 15. Nov 2021, 08:48

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!

PaulSch
Posts: 5
Joined: Fri 12. Nov 2021, 13:49

Re: PCAN-RS-232 create firmware

Post by PaulSch » Mon 15. Nov 2021, 08:58

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

PaulSch
Posts: 5
Joined: Fri 12. Nov 2021, 13:49

Re: PCAN-RS-232 create firmware

Post by PaulSch » Mon 15. Nov 2021, 09:09

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.

M.Heidemann
Sales & Support
Sales & Support
Posts: 1083
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN-RS-232 create firmware

Post by M.Heidemann » Mon 15. Nov 2021, 09:29

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 23046 times
Make_All.png
Make_All.png (17.79 KiB) Viewed 23046 times
What's your output after following these steps?

Can you share a screenshot with us?

Best Regards

Marvin
---
Marvin Heidemann
PEAK-Support Team

PaulSch
Posts: 5
Joined: Fri 12. Nov 2021, 13:49

Re: PCAN-RS-232 create firmware

Post by PaulSch » Mon 15. Aug 2022, 13:50

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!

M.Maidhof
Support
Support
Posts: 1751
Joined: Wed 22. Sep 2010, 14:00

Re: PCAN-RS-232 create firmware

Post by M.Maidhof » Mon 15. Aug 2022, 13:54

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

StefKCPerformance
Posts: 6
Joined: Thu 19. Oct 2023, 10:07

Re: PCAN-RS-232 create firmware

Post by StefKCPerformance » Mon 23. Oct 2023, 14:49

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.

M.Maidhof
Support
Support
Posts: 1751
Joined: Wed 22. Sep 2010, 14:00

Re: PCAN-RS-232 create firmware

Post by M.Maidhof » Mon 23. Oct 2023, 17:29

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

Post Reply