Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

How to active/port new features to your board. #14

@jfm92

Description

@jfm92

This guide will show how to active/port a feature that it's available in your board, but it's not ported yet. This is useful to port new boards and change the pin mapping of a board, but those aspects will be touch in other guide.
So we will follow as example how to port I2C to the STM32LDiscovery Kit which have I2C bus, but it's not ported yet.

Go to NuttX\Configs\stm32ldiscovery\include\board.h and add theses lines, in "preprocessor definitions":

imagen

This line is to give the direction and configuration of the pin that we will use. This data you can find in the architecture files of your board. For example for this case you can find in:
NuttX\arch\arm\src\stm32\chip\stm32stm32l15xxx_pinmap.h

Here you can see the pin map of each peripheral of the architecture and which options are available to set the pin (Available in the previous file).

imagen

As you can see, seeing the different options that give us that file, you can also change the pin mapping of the board and add more buses (Like add more UART port).

Once you've add the new pins, some ports of boards, have the issue that they initialize the peripheral properly, so to solve this problem you can use the next issue:
Modifying the boot sequence

And for last, check that the file stm32_boot.c have theses lines:
imagen

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions