Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Commit

Permalink
nucleo-f411re board added
Browse files Browse the repository at this point in the history
  • Loading branch information
ilg-ul committed Aug 4, 2015
1 parent d230e49 commit 0134da2
Showing 1 changed file with 36 additions and 12 deletions.
48 changes: 36 additions & 12 deletions hw/arm/stm32-nucleo-boards.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,48 @@ static void nucleo_l152re_board_init_callback(MachineState *machine)
}
#endif

#if 0
// Disabled due to HAL clock init problems when no clock is defined.
/* ----- ST NUCLEO-F411RE ----- */
static void nucleo_f411re_board_init_callback(MachineState *machine);

static QEMUMachine nucleo_f411re_machine = {
.name = "NUCLEO-F411RE",
.desc = "ST Nucleo Development Board for STM32 F4 series (Experimental)",
.init = nucleo_f411re_board_init_callback};
static GPIOLEDInfo nucleo_f411re_leds_info[] = {
{
.name = "green-led",
.active_low = false,
.colour_message = "Green",
.x = 316,
.y = 307,
.w = 8,
.h = 6,
.gpio_path = "/machine/mcu/stm32/gpio[a]",
.port_bit = 5, },
{ }, /**/
};

static void nucleo_f411re_board_init_callback(MachineState *machine)
{
cm_board_greeting(machine);
//cortexm_mcu_alloc(machine, TYPE_STM32F411RE);

/* TODO: Add board inits */
{
/* Create the MCU */
Object *mcu = cm_object_new_mcu(machine, TYPE_STM32F411RE);

/* The board has no oscillators. */
cm_object_property_set_int(mcu, 0, "hse-freq-hz"); /* N/A */
cm_object_property_set_int(mcu, 0, "lse-freq-hz"); /* N/A */

cm_object_realize(mcu);
}

void *board_surface = cm_board_init_image("NUCLEO-F411RE.jpg",
cm_board_get_desc(machine));

Object *peripheral = cm_container_get_peripheral();
gpio_led_create_from_info(peripheral, nucleo_f411re_leds_info,
board_surface);
}
#endif

static QEMUMachine nucleo_f411re_machine = {
.name = "NUCLEO-F411RE",
.desc = "ST Nucleo Development Board for STM32 F4 series",
.init = nucleo_f411re_board_init_callback };

#if 0
/* ----- ST NUCLEO-F334R8 ----- */
Expand All @@ -128,9 +152,9 @@ static void nucleo_f334r8_board_init_callback(MachineState *machine)
static void stm32_machines_init(void)
{
qemu_register_machine(&nucleo_f103rb_machine);
qemu_register_machine(&nucleo_f411re_machine);
#if 0
qemu_register_machine(&nucleo_l152re_machine);
qemu_register_machine(&nucleo_f411re_machine);
qemu_register_machine(&nucleo_f334r8_machine);
#endif
}
Expand Down

0 comments on commit 0134da2

Please sign in to comment.