ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board

More
3 years 9 months ago #262232 by wuyatom
Hello , do you support 5A75E board?

Please Log in to join the conversation.

More
3 years 9 months ago #262323 by TOLP2

Hello , do you support 5A75E board?
Yes, it is supported. Please find two configuration files attached. These will work perfectly fine for any version 6.0, 8.0 or 8.2 5A-75E board. You should change the extension to .json, because the forum does not allow me to upload that type.

Please Log in to join the conversation.

More
3 years 9 months ago #262438 by TOLP2
I just released a new pre-release of LitexCNC. This pre-release focuses on support of LinuxCNC 2.9 and solving compiler warnings. It contains also some minor bug-fixes.

One can install this pre-release with:
Code:
pip install --extra-index-url https://test.pypi.org/simple/ litexcnc

The documentation can be found here .

Next step
I will now focus on getting the card in my EMCO5 to get some experience in its real-life performance. This little EMCO has a toolchanger, which requires some extra firmware (toolerator3000). I would like to add this carroussel type of firmware to the card. LitexCNC is going to have a plugin eco-system to add more components in the future.

Please Log in to join the conversation.

More
3 years 9 months ago #262494 by besriworld
I want to try, is there anything special when starting in virtual OS ?

Please Log in to join the conversation.

More
3 years 9 months ago #262573 by TOLP2
If you mean the dev containers I use: you can test whether it compiles and build firmware. I never got the card to talk to the container, because UDP packets get lost. One way to solve that is to use a cheap USB to Ethernet adapter and assign that to the container. My solution is just to use an old NUC, so no virtual OS for me anymore.

Please Log in to join the conversation.

More
3 years 9 months ago #262801 by wuyatom
 

Attachment not found

What is the reason for this? The first time you brush the firmware, you can connect the board, and the linuxcnc can also display it. After the linuxcnc is closed, the connection will be like this

Please Log in to join the conversation.

More
3 years 9 months ago #262808 by wzor
Have you tried naming a hal file in English?

Please Log in to join the conversation.

More
3 years 9 months ago #262863 by TOLP2

 

Attachment not found

What is the reason for this? The first time you brush the firmware, you can connect the board, and the linuxcnc can also display it. After the linuxcnc is closed, the connection will be like this
The error you get is that the checksum of the board is different from the checksum of the config-file. Could you please verify:
  • you did not change the JSON-file after compiling the firmware?
    As even changing the name or changing a line ending will lead to different CRC checksum, changing names requires recompilation. Maybe something went wrong while copying the file. You can check the check-sum your self with an online CRC calculator. When compiling the driver it will also show you the calculated CRC which is stored on the board.
  • if JSON unchanged, do you use other then UTF-8 characters?
    I didn't test it with extended character sets (i.e. UTF-16 etc.). These files might mess things up due to a BOM being present, which might be not read with Python, but are picked up by the driver.
Status update:
I expect this week to finish a full refactoring of the driver. This new driver allows for:
  • easily adding driver for new components. They are now stored in the folder ./driver/modules and are automatically picked up when compiling the driver. All of the modules in this folder have a fixed format, so easier to read and develop your own. 
  • the firmware can have any number of modules. If you only need GPIO, you only have to add GPIO. This makes the compilation of the firmware more efficient. Also this allows number of modules easily to be expanded.
  • preparation is done for loading the config from the board instead from the JSON. If problems with loading from a config persist, this might be an option to make things easier (although you will lose the possibility to rename the pins, but you have the alias commands in HAL anyways)
The structure of the had to be slightly modified to support this behavior, see below for an example.
Code:
{     "board_name": "test_PWM_GPIO",     "baseclass": "litexcnc.firmware.boards.ColorLight_5A_75E_V6_0",     "clock_frequency": 40000000,     "ethphy": {         "tx_delay": 0     },     "etherbone": {         "ip_address": "10.0.0.10",         "mac_address": "0x10e2d5000000"     },     "modules": [         {             "module_type": "gpio",             "input": [                 {"pin":"j1:0", "name":"j1:1"},                 {"pin":"j1:1", "name":"j1:2"},                 {"pin":"j1:2", "name":"j1:3"},                 {"pin":"j1:4", "name":"j1:5"},                 {"pin":"j1:5", "name":"j1:6"},                 {"pin":"j1:6", "name":"j1:7"},                 {"pin":"j2:0", "name":"j2:1"},                 {"pin":"j2:1", "name":"j2:2"},                 {"pin":"j2:2", "name":"j2:3"},                 {"pin":"j2:4", "name":"j2:5"},                 {"pin":"j2:5", "name":"j2:6"},                 {"pin":"j2:6", "name":"j2:7"},                 {"pin":"j3:0", "name":"j3:1"},                 {"pin":"j3:1", "name":"j3:2"},                 {"pin":"j3:2", "name":"j3:3"},                 {"pin":"j3:4", "name":"j3:5"},                 {"pin":"j3:5", "name":"j3:6"},                 {"pin":"j3:6", "name":"j3:7"},                 {"pin":"j4:0", "name":"j4:1"},                 {"pin":"j4:1", "name":"j4:2"},                 {"pin":"j4:2", "name":"j4:3"},                 {"pin":"j4:4", "name":"j4:5"},                 {"pin":"j4:5", "name":"j4:6"},                 {"pin":"j4:6", "name":"j4:7"},                 {"pin":"j5:0", "name":"j5:1"},                 {"pin":"j5:1", "name":"j5:2"},                 {"pin":"j5:2", "name":"j5:3"},                 {"pin":"j5:4", "name":"j5:5"},                 {"pin":"j5:5", "name":"j5:6"},                 {"pin":"j5:6", "name":"j5:7"},                 {"pin":"j6:0", "name":"j6:1"},                 {"pin":"j6:1", "name":"j6:2"},                 {"pin":"j6:2", "name":"j6:3"},                 {"pin":"j6:4", "name":"j6:5"},                 {"pin":"j6:5", "name":"j6:6"},                 {"pin":"j6:6", "name":"j6:7"},                 {"pin":"j7:0", "name":"j7:1"},                 {"pin":"j7:1", "name":"j7:2"},                 {"pin":"j7:2", "name":"j7:3"},                 {"pin":"j7:4", "name":"j7:5"},                 {"pin":"j7:5", "name":"j7:6"},                 {"pin":"j7:6", "name":"j7:7"}             ],             "output": [                 {"pin":"j1:7" , "name":"j1:8" },                 {"pin":"j1:8" , "name":"j1:9" },                 {"pin":"j1:9" , "name":"j1:10"},                 {"pin":"j1:10", "name":"j1:11"},                 {"pin":"j1:11", "name":"j1:12"},                 {"pin":"j1:12", "name":"j1:13"},                 {"pin":"j1:13", "name":"j1:14"},                 {"pin":"j1:14", "name":"j1:15"},                 {"pin":"j9:0" , "name":"j9:1" },                 {"pin":"j9:1" , "name":"j9:2" },                 {"pin":"j9:2" , "name":"j9:3" },                 {"pin":"j9:4" , "name":"j9:5" },                 {"pin":"j9:5" , "name":"j9:6" },                 {"pin":"j9:6" , "name":"j9:7" },                 {"pin":"j10:0", "name":"j10:1"},                 {"pin":"j10:1", "name":"j10:2"},                 {"pin":"j10:2", "name":"j10:3"},                 {"pin":"j10:4", "name":"j10:5"},                 {"pin":"j10:5", "name":"j10:6"},                 {"pin":"j10:6", "name":"j10:7"},                 {"pin":"j11:0", "name":"j11:1"},                 {"pin":"j11:1", "name":"j11:2"},                 {"pin":"j11:2", "name":"j11:3"},                 {"pin":"j11:4", "name":"j11:5"},                 {"pin":"j11:5", "name":"j11:6"},                 {"pin":"j11:6", "name":"j11:7"},                 {"pin":"j12:0", "name":"j12:1"},                 {"pin":"j12:1", "name":"j12:2"},                 {"pin":"j12:2", "name":"j12:3"},                 {"pin":"j12:4", "name":"j12:5"},                 {"pin":"j12:5", "name":"j12:6"},                 {"pin":"j12:6", "name":"j12:7"},                 {"pin":"j13:0", "name":"j13:1"},                 {"pin":"j13:1", "name":"j13:2"},                 {"pin":"j13:2", "name":"j13:3"},                 {"pin":"j13:4", "name":"j13:5"},                 {"pin":"j13:5", "name":"j13:6"},                 {"pin":"j13:6", "name":"j13:7"},                 {"pin":"j14:0", "name":"j14:1"},                 {"pin":"j14:1", "name":"j14:2"},                 {"pin":"j14:2", "name":"j14:3"},                 {"pin":"j14:4", "name":"j14:5"},                 {"pin":"j14:5", "name":"j14:6"},                 {"pin":"j14:6", "name":"j14:7"},                 {"pin":"j15:0", "name":"j15:1"},                 {"pin":"j15:1", "name":"j15:2"},                 {"pin":"j15:2", "name":"j15:3"},                 {"pin":"j15:4", "name":"j15:5"},                 {"pin":"j15:5", "name":"j15:6"},                 {"pin":"j15:6", "name":"j15:7"}             ]         }, {             "module_type": "pwm",             "instances": [                   {"pin":"j16:0", "name":"j16:1"},                 {"pin":"j16:1", "name":"j16:2"},                 {"pin":"j16:2", "name":"j16:3"},                 {"pin":"j16:4", "name":"j16:5"},                 {"pin":"j16:5", "name":"j16:6"},                 {"pin":"j16:6", "name":"j16:7"}             ]         }, {             "module_type": "encoder",             "instances": [                 {                       "name": "MPG",                     "pin_A":"j8:0",                     "pin_B":"j8:1",                     "pin_Z":"j8:2"                 },                 {                     "name": "spindle_fb",                     "pin_A":"j8:4",                     "pin_B":"j8:5",                     "pin_Z":"j8:6"                 }             ]         }     ] }

 

Please Log in to join the conversation.

More
3 years 9 months ago #262898 by deroj
Thank you.
Now I am one step further
Code:
oj@oj-turner:~$ sudo litexcnc install_driver INFO: Compiling LitexCNC driver... Compiling realtime litexcnc.c litexcnc.c: In function ‘litexcnc_register’: litexcnc.c:261:9: warning: format not a string literal and no format arguments [-Wformat-security]   261 |         rtapi_snprintf(fpga->name, sizeof(fpga->name), board_name->valuestring);       |         ^~~~~~~~~~~~~~ litexcnc.c: In function ‘litexcnc_load_config’: litexcnc.c:177:5: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]   177 |     fread(buffer, filelen, 1, fileptr);   // Read in the entire file       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Linking litexcnc.so cp litexcnc.so /usr/lib/linuxcnc/modules/ Compiling realtime litexcnc_eth.c Linking litexcnc_eth.so cp litexcnc_eth.so /usr/lib/linuxcnc/modules/ Compiling realtime pos2vel.c Linking pos2vel.so cp pos2vel.so /usr/lib/linuxcnc/modules/ INFO: LitexCNC driver installedoj@oj-turner:~$ halrun halcmd: loadrt litexcnc Note: Using POSIX realtime litexcnc: Loading Litex CNC driver version 1.1.0 halcmd: exit litexcnc: LitexCNC driver unloaded Note: Using POSIX realtime oj@oj-turner:~$
 

Please Log in to join the conversation.

More
3 years 9 months ago #262900 by deroj
Code:
oj@oj-turner:~$ halrun halcmd: loadrt litexcnc Note: Using POSIX realtime litexcnc: Loading Litex CNC driver version 1.1.0 halcmd: loadrt litexcnc_eth config_file="/home/oj/LiteX-CNC/examples/5a-75b-v80-full.json" litexcnc: loading litexCNC etherbone driver version 0.02 litexcnc: Connecting to board at address: 192.168.0.50:1234 litexcnc: Setting up modules... litexcnc:  - Watchdog litexcnc:  - Wallclock litexcnc:  - GPIO litexcnc:  - PWM litexcnc:  - Stepgen litexcnc:  - Encoder litexcnc: Creating read and write buffers... litexcnc:  - Write buffer: 100 bytes) litexcnc:  - Read buffer: 116 bytes) litexcnc: Exporting functions... halcmd:

Please Log in to join the conversation.

Time to create page: 0.611 seconds
Powered by Kunena Forum