-
Notifications
You must be signed in to change notification settings - Fork 3k
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
NUCLEO_G031K8: Add new target #13006
Conversation
I have blinky compiling. Still waiting on my NUCLEO_G031K8 board to arrive. I figured I would submit this PR for review anyway so I can get feedback from the ST team. I will run mbed tests when my board comes in. |
@AGlass0fMilk, thank you for your changes. |
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 can't test, but looks OK except minor updates
Thx!
targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G031xx/TARGET_NUCLEO_G031K8/PinNames.h
Outdated
Show resolved
Hide resolved
LED2 = PC_6, | ||
LED3 = PC_6, | ||
LED4 = PC_6, |
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.
Remove them
|
||
|
||
// This board does not have any buttons (aside from reset) | ||
USER_BUTTON = PC_13, |
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.
If there is no button, we should not define it ?
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 thought this was a required PinName (like LED1) but I will look through mbed-os to see if there's any reference.
@@ -19,6 +19,11 @@ | |||
|
|||
#define UART_NUM (5) | |||
|
|||
// Retarget this IRQn symbol for chips without USART3/4 | |||
#if defined(STM32G031xx) | |||
#define USART3_4_LPUART1_IRQn LPUART1_IRQn |
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.
OK,
we should make this cleaner later
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.
Yes, I'm open to suggestions. The family-level G0 implementations seem to be oriented towards only the G07x series. This was how I fixed it in the simplest way.
targets/targets.json
Outdated
"extra_labels_add": [ | ||
"STM32G0", | ||
"STM32G031xx", | ||
"STM32G031K8" |
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.
To remove
TARGET_STM32G031K8 directory doesn't exist
targets/targets.json
Outdated
"detect_code": [ | ||
"0221" |
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 think this "detect_code" are not used any more in mbed...
But correct code is "0852" for NUCLEO_G031K8
Maybe you have to push a PR in https://github.com/ARMmbed/mbed-os-tools ?
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.
Where do you find the correct detect codes for each nucleo board?
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.
This should be the 4 first digit of code Id of MBED.HTM file...
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.
Resolved with 47b42a6
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 @jeromecoutant , I'll set this as changes needed
@AGlass0fMilk Any plans to update this PR? |
Yes I will work on this more in the next few days. |
targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G031xx/TARGET_NUCLEO_G031K8/PeripheralPins.c
Outdated
Show resolved
Hide resolved
targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G031xx/TARGET_NUCLEO_G031K8/PeripheralPins.c
Outdated
Show resolved
Hide resolved
@AGlass0fMilk any update on this PR? |
This PR cannot be merged due to conflicts. Please rebase to resolve them. |
targets/targets.json
Outdated
}, | ||
"device_has_add": [ | ||
"SERIAL_ASYNCH", | ||
"MPU" |
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 think the "FLASH" component is missing here otherwise "FLASHIAP" would not work
When trying to compile a simple program i'm getting an error
@0xc0170 what if i submit a new PR because this one seems to dead or maybe @AGlass0fMilk can give me an access so i can do requested changes here |
@pilotak if you can, send a new PR (@AGlass0fMilk can fetch your remote, and send PR to your fork to help) ? I'll close this as it has been idle for some time, always can be reopened with an update. |
Sorry, this kind of fell to the bottom of my list... I will finish it sometime when it gets back to the top. |
@jeromecoutant @0xc0170 See updated target configuration with bare-metal profile as default. This should hopefully fix the CI issues -- they look like they were caused by out-of-memory issues during linking. |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Build is now OK, but NUCLEO_G031K8 has been skipped :-) |
It should have been run. I've checked and it was not, the target should be available for building. cc @ARMmbed/mbed-os-tools please review as well |
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.
Just one json formatting nit. Otherwise looks alright from the tools point of view.
@Patater @0xc0170 @jeromecoutant Please review. What's the problem with CI? |
CI status is green, but CI doesn't build baremetal only targets. :-) @0xc0170 build has been verified manually, you can merge! |
Ci started, once all green will be merged |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 3 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
the baremetal list is manually maintained in CI, we can manually add it once this merged |
Quick update on webpage: https://os.mbed.com/platforms/ST-Nucleo-G031K8/ |
Typo in URL on that page:
TARGET_NUCLEO_AG031K8 should be TARGET_NUCLEO_G031K8 |
Thx |
I keep getting the following error when trying to use I2C2 pins A4(PA_12) and A5(PA_11)
Code works fine when I use any of the other SPI1 pins. Checked the PeripheralPins.c file for the board and it seems fine. example of code that would fail:
Can anyone try this and see if they get the same result? |
Summary of changes
Added support for NUCLEO_G031K8 target
Impact of changes
Migration actions required
Documentation
Pull request type
Test results
GCC ARM Version Info:
Testing results still pending... I have a NUCLEO_G031K8 board on the way...
Reviewers
@jeromecoutant
@ARMmbed/team-st-mcd