5
3
Fork
You've already forked libfx2
0

Add support for modifying USB strings during runtime #3

Closed
jedrzejboczar wants to merge 3 commits from master into master
pull from: master
merge into: GlasgowEmbedded:master
GlasgowEmbedded:main
jedrzejboczar commented 2019年11月29日 17:27:53 +01:00 (Migrated from github.com)
Copy link

This is to allow FX2 to set some USB strings that are being read from other devices.

This is to allow FX2 to set some USB strings that are being read from other devices.
jedrzejboczar commented 2019年11月29日 18:50:59 +01:00 (Migrated from github.com)
Copy link

Travis fails while linking boot-dfu because there is not enough RAM space, but I cannot reproduce this when building with exactly the same flags. Could it be related to SDCC version?

Travis fails while linking boot-dfu because there is not enough RAM space, but I cannot reproduce this when building with exactly the same flags. Could it be related to SDCC version?

You don't need any new code for this, just cast away the __code const qualifiers like here and replace them with __xdata. (Of course, this is only legal to do on the FX2, since 8051 code and xdata spaces don't have to address the same memory in general.)

That's a bit dirty, and perhaps it would be better to have all descriptors mutable and __xdata in the first place. But I think it should be one of those two options rather than adding any new code.

You don't need any new code for this, just cast away the `__code const` qualifiers like [here](https://github.com/GlasgowEmbedded/glasgow/blob/master/firmware/main.c#L252-L265) and replace them with `__xdata`. (Of course, this is only legal to do on the FX2, since 8051 code and xdata spaces don't have to address the same memory in general.) That's a bit dirty, and perhaps it would be better to have all descriptors mutable and `__xdata` in the first place. But I think it should be one of those two options rather than adding any new code.
jedrzejboczar commented 2019年12月02日 09:26:10 +01:00 (Migrated from github.com)
Copy link

Thanks. This is of course much better solution. In fact I tried to do this, but missed the __xdata specifier. Should have known that with small memory model it is needed.

Thanks. This is of course much better solution. In fact I tried to do this, but missed the `__xdata` specifier. Should have known that with small memory model it is needed.

Pull request closed

This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
GlasgowEmbedded/libfx2!3
Reference in a new issue
GlasgowEmbedded/libfx2
No description provided.
Delete branch "master"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?