Skip to content

Added STM32F030K6 as Generic type #293

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

Closed
wants to merge 4 commits into from

Conversation

swissbyte
Copy link

Hello

I have tried to add the STM32F030K6 as a generic part.
This config compiles successfully. I will add more Parts if this is appreciated.

Regards
Swissbyte

@swissbyte
Copy link
Author

I saw that the checks have failed. What is the idea behind the onboard led? A generic Chips does not have on board LEDs. Since there is no board at all.

@fpistm fpistm self-assigned this Aug 5, 2018
@fpistm fpistm self-requested a review August 5, 2018 17:51
@fpistm fpistm added the new variant Add support of new bard label Aug 5, 2018
@fpistm
Copy link
Member

fpistm commented Aug 5, 2018

Hi, thanks,
I will review it when got some time.
Any contributions are welcome.

You're right, Blink sketch it's probably not the best sketch to build for Travis.
Travis deployment was done since 2 Weeks, this will be enhance.

@swissbyte
Copy link
Author

Thanks for your response. If you have some guidlines for further contributions, please let me know so that i can follow them in the future. By the way, i tried to open an account on the stm32duino forum. Unfortunately i never received an activation email.

fpistm added a commit that referenced this pull request Aug 6, 2018
As some variant could not have LED_BUILTIN use the bare example.

See #293

Signed-off-by: Frederic.Pillon <[email protected]>
@swissbyte
Copy link
Author

Thank you for your review.
I will do the necessarry changes as soon as possible!

@Testato
Copy link
Contributor

Testato commented Aug 10, 2018

I never seen on arduino core family a variant without a board.
Do you think it is a good idea ?
You can found a cheaper board whit your mcu and add a variant for it (like it is done for the Bluepill)

@fpistm
Copy link
Member

fpistm commented Aug 13, 2018

This can be discussed.
Defining a generic MCU target with all pins is possible as an enabler for test purposes and quickly validate a board. This could have some advantage, anyway it will be always a good idea to define it as a dedicated variant for pins ordering and assigning pins to a dedicated peripheral.

@swissbyte
Copy link
Author

@Testato the idea behind this is to support any board you imagine with this particular chip on it.
So if i make my own board with this chip, then i can define my peripherals with defines if i need so. And i dont have to do anything else to support my new board. just choose this chip out of the list.
By the way, im still working on fixing the issues. before my next "release" of the changes i will also try them on a real hardware to make sure, everything works as expected.

@swissbyte
Copy link
Author

I have changed all files according to your review requests.
Very stupid that i forgot to modifie the pins in the variant.cpp and h file.
Now everything should be correct.

I only havent figured out how to implement the board.txt in such a way that we can shoose the specific chip in the "board part number" dropdown instead of the "board" drop down.

@swissbyte
Copy link
Author

swissbyte commented Aug 16, 2018

verified with physical board. GPIOs, timers, serial interfaces are working!

@kaofishy
Copy link

IIRC the ESP8266 Arduino core has a drop down menu for selecting the pin for the LED, don’t know if something similar is workable for STM32 (like defining a common subset of GPIO ports across families?)

xC0000005 pushed a commit to xC0000005/Arduino_Core_STM32 that referenced this pull request Nov 27, 2018
As some variant could not have LED_BUILTIN use the bare example.

See stm32duino#293

Signed-off-by: Frederic.Pillon <[email protected]>
@Aulakiria
Copy link

Aulakiria commented Dec 3, 2018

k6-sch

Hi,

I made a schematic as shown in the picture.
Is there anything I have done wrong?

Regards.

@Aulakiria
Copy link

20181217_230419
20181217_230416

I make Break board.
It is Good working. ^^

@Aulakiria
Copy link

20181227_170151

oled test... ^^;

@Aulakiria
Copy link

I wrote a sketch that displays the input of PA0.
It does not display the input of PA0.
PA5 input is displayed.

#include <Arduino.h>
#include <U8g2lib.h>

const int AnalogPin = PA0;

void setup(void) {
pinMode(AnalogPin, INPUT);
u8g2.begin();
}

void loop(void) {
u8g2.firstPage();
do {
u8g2.setFont(u8g2_font_ncenB14_tr);
u8g2.setCursor(0, 15);
u8g2.print(analogRead(AnalogPin));
//u8g2.drawStr(0,15,analogRead(0));
} while ( u8g2.nextPage() );
}

@fpistm
Copy link
Member

fpistm commented Mar 19, 2019

Since this PR was submit, several update of the core has been added which would allow to be more generic.
(LD script preprocessing, common attribute...)
Moreover, after thinking about it and based on users feedback, variant should be only for a dedicated or family board else this bring too much support around customization, configuration,...
It is enough simple to create his own variant with all file provided (PeripheralPins, PinMaps, ldscript and clock config generated by STM32CubeMX).
One thing I will do is it to provide a way to generate the variant.[h|cpp] with a default pin mapping.

@fpistm fpistm closed this Mar 19, 2019
benwaffle pushed a commit to benwaffle/Arduino_Core_STM32 that referenced this pull request Apr 10, 2019
As some variant could not have LED_BUILTIN use the bare example.

See stm32duino#293

Signed-off-by: Frederic.Pillon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new variant Add support of new bard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants