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

More
4 years 9 months ago #232732 by romanetz
I think that my toolchcain is a little bit outdated. These projects are being actively developed nowadays and my installation is from the summer of 2021. The same verilog source can yield different binary files after placement and routing,

Please Log in or Create an account to join the conversation.

More
4 years 9 months ago #233315 by muvideo
Hi,
for the 5A-75E version, does the linuxcnc component source file need to be modified in order to enable the reading of encoders?
I have a 5A-75E board freshly delivered and ready to be tested.

Also can you send the sourcefile for the latest 5A-75B firmware?
I'd like to test that also on a V8.0 5A-75B board, and try to modify
it for trading some DI for some encoders.

Thanks!
Fabio

Please Log in or Create an account to join the conversation.

More
4 years 9 months ago #233576 by tuxcnc
Hi.
Is this hardware suitable for lathe (spindle encoder and rigid tapping) ?
I remember Pluto supports encoders  ...
Regards.

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #234207 by tuxcnc
@romanetz
Which Linux distro and which Linuxcnc version you use?
I tried to compile colorcnc.c component, but I got a lot of errors.

Please Log in or Create an account to join the conversation.

  • ALittleOffTheRails
  • Visitor
  • Visitor
4 years 8 months ago #234208 by ALittleOffTheRails
Replied by ALittleOffTheRails on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
Have you installed the Linuxcnc dev package ?

What errors are you encountering ?

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #234215 by tuxcnc

Have you installed the Linuxcnc dev package ?

What errors are you encountering ?
 
 
Of course, I have, I use halcompile command.
First, I must edit source and give full path for include files colorcnc.h and etherbone.h, but this is not important.
The full output is :
Code:
root@E555:/temp/src/colorcnc# halcompile  --compile --userspace colorcnc.c gcc -I/usr/include -I/usr/include/linuxcnc -URTAPI -U__MODULE__ -DULAPI -Os  -o colorcnc /tmp/tmpCaSFMZ/colorcnc.c -Wl,-rpath,/lib -L/lib -llinuxcnchal In file included from /tmp/tmpCaSFMZ/colorcnc.c:7: /usr/include/linuxcnc/rtapi_app.h:27:1: warning: data definition has no type or storage class    27 | EXPORT_SYMBOL(rtapi_app_main);       | ^~~~~~~~~~~~~ /usr/include/linuxcnc/rtapi_app.h:27:1: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL’ [-Wimplicit-int] /usr/include/linuxcnc/rtapi_app.h:27:1: warning: parameter names (without types) in function declaration /usr/include/linuxcnc/rtapi_app.h:28:1: warning: data definition has no type or storage class    28 | EXPORT_SYMBOL(rtapi_app_exit);       | ^~~~~~~~~~~~~ /usr/include/linuxcnc/rtapi_app.h:28:1: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL’ [-Wimplicit-int] /usr/include/linuxcnc/rtapi_app.h:28:1: warning: parameter names (without types) in function declaration /tmp/tmpCaSFMZ/colorcnc.c:20:15: error: expected declaration specifiers or ‘...’ before string constant    20 | MODULE_AUTHOR("romanetz");       |               ^~~~~~~~~~ /tmp/tmpCaSFMZ/colorcnc.c:21:20: error: expected declaration specifiers or ‘...’ before string constant    21 | MODULE_DESCRIPTION("colorcnc board driver");       |                    ^~~~~~~~~~~~~~~~~~~~~~~ /tmp/tmpCaSFMZ/colorcnc.c:22:16: error: expected declaration specifiers or ‘...’ before string constant    22 | MODULE_LICENSE("GPL");       |                ^~~~~ /tmp/tmpCaSFMZ/colorcnc.c:29:32: error: expected ‘)’ before numeric constant    29 | RTAPI_MP_ARRAY_STRING(board_ip, 1, "ip address of ethernet board");       |                                ^~       |                                ) /tmp/tmpCaSFMZ/colorcnc.c:32:25: error: expected ‘)’ before string constant    32 | RTAPI_MP_INT(speedrange, "Speed range 0..3");       |                         ^~~~~~~~~~~~~~~~~~~       |                         ) /tmp/tmpCaSFMZ/colorcnc.c: In function ‘rtapi_app_main’: /tmp/tmpCaSFMZ/colorcnc.c:504:75: warning: passing argument 2 of ‘hal_param_u32_newf’ from incompatible pointer type [-Wincompatible-pointer-types]   504 |         r = hal_param_u32_newf(HAL_RO,((char*)&(device_data->rcvd_pos[i]))+4, comp_id, "colorcnc.%d.stepgen.%01d.rcvd_position_msb", 1, i);       |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~       |                                                                           |       |                                                                           char * In file included from /tmp/tmpCaSFMZ/colorcnc.c:8: /usr/include/linuxcnc/hal.h:547:17: note: expected ‘volatile hal_u32_t *’ {aka ‘volatile unsigned int *’} but argument is of type ‘char *’   547 |     hal_u32_t * data_addr, int comp_id, const char *fmt, ...)       |     ~~~~~~~~~~~~^~~~~~~~~ /tmp/tmpCaSFMZ/colorcnc.c:507:39: warning: passing argument 2 of ‘hal_param_u32_newf’ from incompatible pointer type [-Wincompatible-pointer-types]   507 |         r = hal_param_u32_newf(HAL_RO,&(device_data->rcvd_pos[i]), comp_id, "colorcnc.%d.stepgen.%01d.rcvd_position_lsb", 1, i);       |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~       |                                       |       |                                       __u64 * {aka long long unsigned int *} In file included from /tmp/tmpCaSFMZ/colorcnc.c:8: /usr/include/linuxcnc/hal.h:547:17: note: expected ‘volatile hal_u32_t *’ {aka ‘volatile unsigned int *’} but argument is of type ‘__u64 *’ {aka ‘long long unsigned int *’}   547 |     hal_u32_t * data_addr, int comp_id, const char *fmt, ...)       |     ~~~~~~~~~~~~^~~~~~~~~ /tmp/tmpCaSFMZ/colorcnc.c:558:82: warning: too many arguments for format [-Wformat-extra-args]   558 |  retval = hal_param_u32_newf(HAL_RW, &(device_data-> stepgen_steplen), comp_id, "colorcnc.%d.stepgen.steplen", 1, i);       |                                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /tmp/tmpCaSFMZ/colorcnc.c:565:82: warning: too many arguments for format [-Wformat-extra-args]   565 |  retval = hal_param_u32_newf(HAL_RW, &(device_data-> stepgen_dirtime), comp_id, "colorcnc.%d.stepgen.dirtime", 1, i);       |                                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /tmp/tmpCaSFMZ/colorcnc.c:638:14: warning: implicit declaration of function ‘hal_export_funct’ [-Wimplicit-function-declaration]   638 |     retval = hal_export_funct(name, update_port, device_data, 1, 0,comp_id);       |              ^~~~~~~~~~~~~~~~ /tmp/tmpCaSFMZ/colorcnc.c:653:22: warning: passing argument 1 of ‘eb_fill_readwrite32’ discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]   653 |  eb_fill_readwrite32(wb_wr_buffer, 0, 0x0, 1);       |                      ^~~~~~~~~~~~ /tmp/tmpCaSFMZ/colorcnc.c:96:33: note: expected ‘uint8_t *’ {aka ‘unsigned char *’} but argument is of type ‘volatile __u8 *’ {aka ‘volatile unsigned char *’}    96 | int eb_fill_readwrite32(uint8_t wb_buffer[20], uint32_t data, uint32_t address, int is_read) {       |                         ~~~~~~~~^~~~~~~~~~~~~ /tmp/tmpCaSFMZ/colorcnc.c:659:29: warning: passing argument 2 of ‘eb_send’ discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]   659 |  r=eb_send(device_data->eb, wb_wr_buffer, 24);       |                             ^~~~~~~~~~~~ /tmp/tmpCaSFMZ/colorcnc.c:137:53: note: expected ‘const void *’ but argument is of type ‘volatile __u8 *’ {aka ‘volatile unsigned char *’}   137 | int eb_send(struct eb_connection *conn, const void *bytes, size_t len) {       |                                         ~~~~~~~~~~~~^~~~~ /tmp/tmpCaSFMZ/colorcnc.c:662:40: warning: passing argument 2 of ‘eb_recv’ discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]   662 |   int count = eb_recv(device_data->eb, wb_rd_buffer, sizeof(wb_rd_buffer));       |                                        ^~~~~~~~~~~~ /tmp/tmpCaSFMZ/colorcnc.c:143:47: note: expected ‘void *’ but argument is of type ‘volatile __u8 *’ {aka ‘volatile unsigned char *’}   143 | int eb_recv(struct eb_connection *conn, void *bytes, size_t max_len) {       |                                         ~~~~~~^~~~~ /tmp/tmpCaSFMZ/colorcnc.c: In function ‘update_port’: /tmp/tmpCaSFMZ/colorcnc.c:887:29: warning: passing argument 1 of ‘eb_fill_readwrite32’ discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]   887 |         eb_fill_readwrite32(wb_wr_buffer, 0, 0x0, 1);       |                             ^~~~~~~~~~~~ /tmp/tmpCaSFMZ/colorcnc.c:96:33: note: expected ‘uint8_t *’ {aka ‘unsigned char *’} but argument is of type ‘volatile __u8 *’ {aka ‘volatile unsigned char *’}    96 | int eb_fill_readwrite32(uint8_t wb_buffer[20], uint32_t data, uint32_t address, int is_read) {       |                         ~~~~~~~~^~~~~~~~~~~~~ /tmp/tmpCaSFMZ/colorcnc.c:899:24: warning: initialization of ‘__u32 *’ {aka ‘unsigned int *’} from incompatible pointer type ‘pack_mainW_t *’ [-Wincompatible-pointer-types]   899 |         __u32* tmp_ptr=&send_payload;       |                        ^ /tmp/tmpCaSFMZ/colorcnc.c:899:9: warning: converting a packed ‘pack_mainW_t’ pointer (alignment 1) to a ‘__u32’ {aka ‘unsigned int’} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]   899 |         __u32* tmp_ptr=&send_payload;       |         ^~~~~ In file included from /tmp/tmpCaSFMZ/colorcnc.c:12: /temp/src/colorcnc/colorcnc.h:185:9: note: defined here   185 | typedef struct __attribute__ ((packed)) {       |         ^~~~~~ /tmp/tmpCaSFMZ/colorcnc.c:916:38: warning: passing argument 2 of ‘eb_send’ discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]   916 |         res=eb_send(device_data->eb, wb_wr_buffer, num_records_to_write*4+16);       |                                      ^~~~~~~~~~~~ /tmp/tmpCaSFMZ/colorcnc.c:137:53: note: expected ‘const void *’ but argument is of type ‘volatile __u8 *’ {aka ‘volatile unsigned char *’}   137 | int eb_send(struct eb_connection *conn, const void *bytes, size_t len) {       |                                         ~~~~~~~~~~~~^~~~~ /tmp/tmpCaSFMZ/colorcnc.c:920:16: warning: passing argument 1 of ‘memset’ discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]   920 |         memset(wb_wr_buffer,0,sizeof(wb_wr_buffer));       |                ^~~~~~~~~~~~ In file included from /usr/include/features.h:469,                  from /usr/include/ctype.h:25,                  from /usr/include/linuxcnc/rtapi_ctype.h:19,                  from /tmp/tmpCaSFMZ/colorcnc.c:5: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:57:1: note: expected ‘void *’ but argument is of type ‘volatile __u8 *’ {aka ‘volatile unsigned char *’}    57 | __NTH (memset (void *__dest, int __ch, size_t __len))       | ^~~~~ /tmp/tmpCaSFMZ/colorcnc.c:922:29: warning: passing argument 1 of ‘eb_fill_readwrite32’ discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]   922 |         eb_fill_readwrite32(wb_wr_buffer, 0, 0x0, 1);       |                             ^~~~~~~~~~~~ /tmp/tmpCaSFMZ/colorcnc.c:96:33: note: expected ‘uint8_t *’ {aka ‘unsigned char *’} but argument is of type ‘volatile __u8 *’ {aka ‘volatile unsigned char *’}    96 | int eb_fill_readwrite32(uint8_t wb_buffer[20], uint32_t data, uint32_t address, int is_read) {       |                         ~~~~~~~~^~~~~~~~~~~~~ /tmp/tmpCaSFMZ/colorcnc.c:938:38: warning: passing argument 2 of ‘eb_send’ discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]   938 |         res=eb_send(device_data->eb, wb_wr_buffer, num_records_to_read*4+16);       |                                      ^~~~~~~~~~~~ /tmp/tmpCaSFMZ/colorcnc.c:137:53: note: expected ‘const void *’ but argument is of type ‘volatile __u8 *’ {aka ‘volatile unsigned char *’}   137 | int eb_send(struct eb_connection *conn, const void *bytes, size_t len) {       |                                         ~~~~~~~~~~~~^~~~~ /tmp/tmpCaSFMZ/colorcnc.c:942:46: warning: passing argument 2 of ‘eb_recv’ discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]   942 |         int count = eb_recv(device_data->eb, wb_rd_buffer, sizeof(wb_rd_buffer));       |                                              ^~~~~~~~~~~~ /tmp/tmpCaSFMZ/colorcnc.c:143:47: note: expected ‘void *’ but argument is of type ‘volatile __u8 *’ {aka ‘volatile unsigned char *’}   143 | int eb_recv(struct eb_connection *conn, void *bytes, size_t max_len) {       |                                         ~~~~~~^~~~~ make: *** [Makefile:2: colorcnc] Błąd 1

The most important are :
Code:
/tmp/tmpCaSFMZ/colorcnc.c:20:15: error: expected declaration specifiers or ‘...’ before string constant    20 | MODULE_AUTHOR("romanetz");       |               ^~~~~~~~~~ /tmp/tmpCaSFMZ/colorcnc.c:21:20: error: expected declaration specifiers or ‘...’ before string constant    21 | MODULE_DESCRIPTION("colorcnc board driver");       |                    ^~~~~~~~~~~~~~~~~~~~~~~ /tmp/tmpCaSFMZ/colorcnc.c:22:16: error: expected declaration specifiers or ‘...’ before string constant    22 | MODULE_LICENSE("GPL");       |                ^~~~~ /tmp/tmpCaSFMZ/colorcnc.c:29:32: error: expected ‘)’ before numeric constant    29 | RTAPI_MP_ARRAY_STRING(board_ip, 1, "ip address of ethernet board");       |                                ^~       |                                ) /tmp/tmpCaSFMZ/colorcnc.c:32:25: error: expected ‘)’ before string constant    32 | RTAPI_MP_INT(speedrange, "Speed range 0..3");       |                         ^~~~~~~~~~~~~~~~~~~       |                         )

I try comment out these lines, but I get another errors from linker ...
 

Please Log in or Create an account to join the conversation.

Moderators: PCW, jmelson
Time to create page: 0.234 seconds
Powered by Kunena Forum