-
Notifications
You must be signed in to change notification settings - Fork 281
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
Pi Pico port improvements #1050
Conversation
veremenko-y
commented
Mar 31, 2024
* /dev/tty1 is not fully blocking console for kput * /dev/tty2-5 can be configured as independent USB ttys * USB ttys operate through a small ring-buffer to minimize dropouts at high rate of transmission * NAND flash (as block device) can be disabled in config to save 7KB of RAM * /dev/pico device can be used to trigger reboot into flash mode. See utils/rpi script * Trimmed pico SDK to save 5KB of RAM * Patched ps to report number of used blocks (4KB) per process * Misc fix of makeversion.c to prevent overflow
@davidgiven |
I can't reproduce this build error locally
I'm building with the newer version of newlib though. What do you want me to do in this case? E.g. leave it, or should I get an ubuntu VM and ensure it builds there as well?
|
} | ||
|
||
void device_init(void) | ||
{ | ||
kprintf("Unallocated RAM: %dkB\n", UNUSEDSIZE / 1024); | ||
|
||
/* The flash device is too small to be useful, and a corrupt flash will |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, is this true? Shouldn't there be like 1.5MB free on the flash?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm... I don't think Github clearly shows which line you're reviewing.
If you're talking about the comment, I didn't leave it..
As for Unallocated RAM, it's specifically for RAM, not flash. I tried to remove static allocation of userspace memory in swapper.c (e.g. char progbase[USERMEM];
) but had issues with Pico hard faulting, and I'm new to arm to track it down, and I'm leaving it for later. So instead I just left myself a reminder for the case where USERMEM can be increased because there's unallocated space before stack bank.
@@ -28,9 +28,9 @@ void plt_reboot(void) | |||
|
|||
void plt_monitor(void) | |||
{ | |||
sleep_ms(1); // wait to print any remaining messages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the sleep here, because plt_monitor could be called from interrupt.
The reason I added it is for kernel to print panic properly, but now tty1 is fully blocking.
Can we split this up a bit. It's very hard to navigate all the bits that do differing things.
For the extra device I think it would be better to instead define CONFIG_DEV_PLATFORM at which point misc dev minor 6 ioctls call plt_dev_ioctl to implement any platform specific stuff that doesn't fit anywhere else. Eg the COCO3 port uses it for hooking SWI2/3 for emulating Flex and OS/9 stuff. |
Absolutely. I got a bit carried away with the changes. I'll split and push them as separate PRs.
This is the part of the change I wasn't sure about. Thank you for the info. I'll rewrite the device portion. |