- Posts: 19306
- Thank you received: 0
Mesa UART doesnt work after update to linuxcnc2.8
7 years 1 month ago #144092
by andypugh
Replied by andypugh on topic Mesa UART doesnt work after update to linuxcnc2.8
Which firmware are you using? I suspect I will need that to test with.
Please Log in to join the conversation.
7 years 1 month ago #144116
by thang
Replied by thang on topic Mesa UART doesnt work after update to linuxcnc2.8
Here is my firmware that i'm using. it's include: vhd and bit file
Attachment not found
Please Log in to join the conversation.
7 years 1 month ago #145631
by andypugh
Replied by andypugh on topic Mesa UART doesnt work after update to linuxcnc2.8
I don't seem to be able to make mesa_uart work even in the 2.7 branch.
Can you do a quick test, download the attached testing HAL file, then
And report what happens?
Can you do a quick test, download the attached testing HAL file, then
Code:
halrun
source test.hal
start
And report what happens?
Please Log in to join the conversation.
7 years 1 month ago #145635
by andypugh
Replied by andypugh on topic Mesa UART doesnt work after update to linuxcnc2.8
Don't bother with that, I think I have figured out the problem. (And a very stupid one it is too)
mesa_uart.comp contains these lines:
This was meant to keep a local copy in each uart instance of the uart that it belongs to.
Anyone with any competence in C, however, will notice that this actually simply sets the pointer address of "name" to the current pointer address of "prefix" and there is no guarantee that the contents of that will remain as the desired characters.
What it should be is something like:
Can you try this modified version of mesa_uart.comp ? You will need to
mesa_uart.comp contains these lines:
Code:
variable char *name; // UART name
...
name = prefix;
This was meant to keep a local copy in each uart instance of the uart that it belongs to.
Anyone with any competence in C, however, will notice that this actually simply sets the pointer address of "name" to the current pointer address of "prefix" and there is no guarantee that the contents of that will remain as the desired characters.
What it should be is something like:
Code:
name = hal_malloc(strlen(prefix)+1);
strcpy(name, prefix);
Can you try this modified version of mesa_uart.comp ? You will need to
Code:
sudo halcompile --install mesa_uart.comp
Please Log in to join the conversation.
7 years 1 month ago #146686
by thang
Replied by thang on topic Mesa UART doesnt work after update to linuxcnc2.8
Sorry for being late to response. i was so busy at last week.
Bug is fixed now, thank you very much :laugh:
Bug is fixed now, thank you very much :laugh:
Please Log in to join the conversation.
Time to create page: 0.042 seconds
