-
Notifications
You must be signed in to change notification settings - Fork 70
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
Support Nuvoton's M480 target #446
Conversation
Thanks very much for your PR. We'll review and get back with you soon. |
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.
Thanks again for the PR. This looks almost done. Yet to review is the target linker script in your PR to mbed OS.
platform/m480/inc/configurations.h
Outdated
* FLASH_LENGTH_MIN = min(FLASH_LENGTH_i) for i in family | ||
* SRAM_LENGTH_MIN = min(SRAM_LENGTH_i) for i in family */ | ||
#define FLASH_LENGTH_MIN 0x40000 | ||
#define SRAM_LENGTH_MIN 0x20000 |
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.
- Does the M480-family target with the least amount of SRAM have 128 KiB of SRAM available continuously starting at address 0x20000000?
- Does the M480-family target with the least amount of flash have 256 KiB of flash available continuously starting at address 0x00000000?
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.
Does the M480-family target with the least amount of SRAM have 128 KiB of SRAM available continuously starting at address 0x20000000?
I fixed it to 96KiB. Please refer to 4d97759.
Does the M480-family target with the least amount of flash have 256 KiB of flash available continuously starting at address 0x00000000?
Yes.
platform/m480/src/debug_stdiouart.c
Outdated
*/ | ||
#include <uvisor.h> | ||
|
||
/* Abstract from M480.h */ |
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.
uVisor must have a minimum of platform-dependent code. Please remove the addition of this file from this commit.
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.
@Patater According to uvisor
> core
> debug
> src
> debug.c
, default_putc()
is allowed to override. Per our experience, it could help development as uvisor core debug message could emit via USB VCOM rather than semihosting in debug mode. Besides, the platform beetle
already has the same override.
/* During the porting process the implementation of this function can be
* overwritten to provide a different mechanism for printing messages (e.g. the
* UART port instead of semihosting). */
#define DEBUG_MAX_BUFFER 128
uint8_t g_buffer[DEBUG_MAX_BUFFER];
int g_buffer_pos;
UVISOR_WEAK void default_putc(uint8_t data)
{
if (g_buffer_pos < (DEBUG_MAX_BUFFER - 1)) {
g_buffer[g_buffer_pos++] = data;
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.
Hi @ccli8,
We are working on making debugging without semihosting easier. We unfortunately can't accept the UART driver for M480 into uVisor, but you are free to continue overriding default_putc
out-of-tree.
Thanks
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.
How about status? |
After ARMmbed/mbed-os#4608 is rebased on latest mbed OS, we'll test uVisor on M487. If all goes well, we'll merge this PR. |
What testing has been done so far with this PR on your end? If I'd like to run a debugger, are there instructions available someplace describing how to set up a debugger for the M487? Thanks |
I test on the examples you give by adding
I also create a uVisor example based on yours for our target. It mentions how to debug uVisor program in Keil uVision built with GCC toolchain on our target. |
Thanks for sharing your demo application and providing instructions on setting up debugging. I've run all our uVisor tests with this target, using this PR and the mbed OS PR. All tests pass. Nice work! I am having some issues with the UART, however. I'll post feedback on the mbed OS PR. |
Manually squashed and merged @ccli8 Thanks! |
Hi @Patater , if we would like built
Did I add
|
Hi @ccli8 All we have to do is release the next version of uVisor. I have started working on the PR at ARMmbed/mbed-os#4907. Please have a look. |
@Patater Thanks for your information. |
This PR is to support Nuvoton's M480 series. A target NUMAKER_PFM_M487 of the series is in PR (ARMmbed/mbed-os#4608).