Mesa UART doesnt work after update to linuxcnc2.8

More
7 years 2 months ago #142480 by thang
Here is terminal informartion:

File Attachment:

File Name: halrun.txt
File Size:3.18 KB

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

More
7 years 2 months ago #142716 by andypugh
I do plan to look at this, as soon as I manage to get some time at home between business trips (which have gone slightly mad lately)

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

More
7 years 1 month ago #144092 by andypugh
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.

More
7 years 1 month ago - 7 years 1 month ago #144116 by thang
Here is my firmware that i'm using. it's include: vhd and bit file

File Attachment:

File Name: firmware.t...-03-3.gz
File Size:85.19 KB
Last edit: 7 years 1 month ago by thang.

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

More
7 years 1 month ago #145631 by andypugh
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
Code:
halrun source test.hal start

And report what happens?

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

More
7 years 1 month ago #145635 by andypugh
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:
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
The following user(s) said Thank You: thang

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

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