Mesa UART doesnt work after update to linuxcnc2.8

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 to join the conversation.

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

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 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

Please Log in to join the conversation.

More
7 years 1 month ago #146686 by thang
Sorry for being late to response. i was so busy at last week.
Bug is fixed now, thank you very much :laugh:

Please Log in to join the conversation.

Time to create page: 0.042 seconds
Powered by Kunena Forum