Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nx_packet_allocated return false for RISCV-64 bits arch #278

Open
Alexbruliau opened this issue Jun 26, 2024 · 1 comment
Open

nx_packet_allocated return false for RISCV-64 bits arch #278

Alexbruliau opened this issue Jun 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Alexbruliau
Copy link

Hello,

I am encountering an issue when I used nx_packet_allocate because ULONG is considered to be 8 bytes for the RISCV-64 bits architecture.
It worked perfectly on my previous target CORTEX-R4F.

Any idea ?

image

@Alexbruliau Alexbruliau added the bug Something isn't working label Jun 26, 2024
@Adrian-Skerratt
Copy link

In ThreadX, ULONG (and LONG) should be 32 bits. On other 64-bit processors ULONG is a defined to unsigned int, but not for RISCV64.

This is a bug in ThreadX, but I don't have access to a working RISCV-64 system to check that making this change doesn't cause any other issues.

Are you able to test this?

You need to change the definition of LONG and ULONG in tx_port.h for the riscv-64 port

https://github.com/eclipse-threadx/threadx/blob/485a02faec6edccef14812ddce6844af1d7d2eef/ports/risc-v64/gnu/inc/tx_port.h#L103

to match the correct implementation for a 64-bit processor:

https://github.com/eclipse-threadx/threadx/blob/485a02faec6edccef14812ddce6844af1d7d2eef/ports/cortex_a77/gnu/inc/tx_port.h#L86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants