HP41 TULIP4041 update
|
12-08-2024, 03:23 AM
(This post was last modified: 12-08-2024 03:32 AM by foldedtoad.)
Post: #55
|
|||
|
|||
RE: HP41 TULIP4041 update
I am seeing an alignment fault with TULIP when built on Ubuntu 22.04 + Pico-SDK.
I don't believe this is an issue with TULIP per-se, but rather something in the Pico-SDK. I would be interested in hearing if others have experience a similar problem. Some context: Ubuntu 22.04 LTS gcc 10.3.1 arm-none-eabi-gcc Pico-SDK 2.0.0 (I know there is a newer version: 2.1.0, but not relevant here IMO) newlib version 3.3.0-1.3 (newlib-arm-none-eabi) the library with memcpy() function. Details: The alignment fault occurs when the tinyusb module rp2040_usb.c function sync_ep_buffer() attempts a memcpy() from hw_data_buf (device memory) to user_buf (normal memory) for a length of 7 bytes (when receiving a CDC Set_Line_Coding packet on EP0). When the memcpy() attempts to copy the tail-end of the 7 bytes and used a LDRH asm instruction to load a half-word (16-bits) from device memory (USB Controller memory), the fault occurs. If i replace the memcpy() call in sync_ep_buffer() with a byte-by-byte copy (for loop) in rp2040_usb.c, then I don't see this issue, as the half-word LDRH instruction is not used. With this temporary workaround I have a working TULIP system. I have also loaded the tullip4041.uf2 binary found in the github project and it works without problem. This would indicate there is something in my build environment which is marking the Pico2/RP2350 USB Controller's device memory differently from how it is being build in a Windows environment. Attached is a text file which shows the disassemble memcpy() for ARM V7.m. https://raw.githubusercontent.com/folded..._debug.png |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)