CLOSED, FOCUS GOES TO HAL BASED CORES - Improving F4 core (libmaple based)

Limited support for STM32F4 Discovery, Nucleo and custom F4 boards
ag123
Posts: 775
Joined: Thu Jul 21, 2016 4:24 pm

Re: Improving F4 core (libmaple based)

Post by ag123 » Wed Apr 26, 2017 2:23 pm

yup, lets go with stm32generic, hopefully Daniel will welcome this decision :mrgreen:

oh & for f4, 1'd need to get an f4 with the ART accelerator (500 mflops psuedo whetstone benchmark @240mhz) at least, that'd cope with all the codes however fat it may be, if u get an stm32f405rgt6 it is 1 m flash, for once we see the m suffix for flash :lol:

victor_pv
Posts: 1682
Joined: Mon Apr 27, 2015 12:12 pm

Re: Improving F4 core (libmaple based)

Post by victor_pv » Thu Apr 27, 2017 2:00 pm

Steve, agreed on the F1, for a bluepill and similar libmaple just works fine with fast speeds and little resources, I dont think the HAL comes close to it. And we have a bootloader working, and the knowledge of libmaple to correct or improbe anything.

I will update the first post on this thread to declare that until we find an advantage in the libmaple F4 core over the HAL, we consider this thread dead and the focus will be on Daniel's and perhaps the STM cores, as they also use the HAL so drivers should be compatible between the two to a high degree.

minime
Posts: 20
Joined: Mon Feb 13, 2017 11:10 am

Re: Improving F4 core (libmaple based)

Post by minime » Sat Jun 17, 2017 7:43 am

ag123 wrote:usb serial works pretty well now thanks to steve

Code: Select all

#include <usb_serial.h>

void checkcmd(void);

//note this is for the black f407vet6 board
int ledPin = BOARD_LED_PIN; //PA6
int led1 = BOARD_LED2_PIN; //PA7

int print = false;

// the setup() method runs once when the sketch starts
void setup() {

	SerialUSB.begin(0);

	//initialize the digital pin as an output:
	pinMode(ledPin, OUTPUT);
	pinMode(led1, OUTPUT);
	digitalWrite(ledPin, HIGH);
}

//the loop() method runs over and over again, 
//as long as maple has power
void loop() {
	int i;
	for (i = 0; i < 10; i++) {
		digitalWrite(ledPin, HIGH);
		delay(100);
		digitalWrite(ledPin, LOW);
		delay(100);
	}
	checkcmd();
	if (print) SerialUSB.println("Hello world F407");
	for (i = 0; i < 5; i++) {
		digitalWrite(ledPin, HIGH);
		delay(500);
		digitalWrite(ledPin, LOW);
		delay(500);
		if (print) SerialUSB.println("Hello world F407");
		checkcmd();
	}
}

// listen for the keys 'p' print or 's' stop from the usb serial console
void checkcmd() {
	char r;
	if(SerialUSB.available()) {
		r = SerialUSB.read();
	} else
		return;

	if(r=='p') { //print
		print = true;
	} else if (r=='s') { //stop
		print = false;
	}
}

I followed your example and still the serial us gives erros as not declared, what else have you done to make it work\/

stevestrong
Posts: 1749
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: CLOSED, FOCUS GOES TO HAL BASED CORES - Improving F4 core (libmaple based)

Post by stevestrong » Sat Jun 17, 2017 7:47 am

This thread is closed.

If you want to use libmaple core with F4 generic board, please follow this thread:
http://www.stm32duino.com/viewtopic.php?f=39&t=1976

Btw, instead of SerialUSB simply use Serial.

Post Reply