Mesa UART doesnt work after update to linuxcnc2.8
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23310
- Thank you received: 4858
03 Sep 2019 21:54 #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 or Create an account to join the conversation.
- thang
- Offline
- Elite Member
Less
More
- Posts: 196
- Thank you received: 11
04 Sep 2019 03:04 - 04 Sep 2019 03:54 #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
Attachments:
Last edit: 04 Sep 2019 03:54 by thang.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23310
- Thank you received: 4858
19 Sep 2019 21:43 #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
halrun
source test.hal
start
And report what happens?
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23310
- Thank you received: 4858
19 Sep 2019 22:37 #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:
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:
name = hal_malloc(strlen(prefix)+1);
strcpy(name, prefix);
Can you try this modified version of mesa_uart.comp ? You will need to
sudo halcompile --install mesa_uart.comp
The following user(s) said Thank You: thang
Please Log in or Create an account to join the conversation.
- thang
- Offline
- Elite Member
Less
More
- Posts: 196
- Thank you received: 11
30 Sep 2019 07:16 #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
Bug is fixed now, thank you very much
Please Log in or Create an account to join the conversation.
Moderators: PCW, jmelson
Time to create page: 0.068 seconds