HD44780 Text Display

Hi everyone!
Is there any 100% working actual HD44780 display library for Mbed? Since any one published “doesn’t have printf member”.

Hello,

try this one mbed-ce-libraries-examples/TextLCD: Library for interfacing character LCDs with MbedCE (github.com)
It is prepared for MbedCE but it will work also with regular Mbed.

BR, Jan

1 Like

Thank you! It works. Where can I find more about Mbed CE?

You are welcome

BR, Jan

Mbed CE is not for beginners. It’s really impossible for me to even correctly setup IDE with the toolchain. It just doesn’t work. Sadly.

If you mean it is not like Arduino IDE then yes but it depends if you want move your knowledge forward or not. MbedStudio and KeilStudio Cloud are buggy.

It is possible, just follow the instructions. If you have an issue feel free to ask.

BR, Jan

3 problems so far.

Please be so kind and make a picture of your project structure. These errors occurs because something is missing.

image

Content of CMakeLists.txt ( Points 6-8 of New Project Setup Guide · mbed-ce/)

cmake_minimum_required(VERSION 3.19)
cmake_policy(VERSION 3.19)
set(MBED_APP_JSON_PATH mbed_app.json) 
include(mbed-os/tools/cmake/app.cmake)
add_subdirectory(mbed-os)
project(MbedCE_Example)
add_executable(main main.cpp)
target_link_libraries(main  mbed-os) 
mbed_set_post_build(main)
mbed_finalize_build()

Content of cmake-variants.yaml (Point 5 of Project Setup: VS Code · mbed-ce)

buildType:
  default: Develop
  choices:
    Develop:
      short: Develop
      long: Emit debug information but also optimize
      buildType: Develop
    Debug:
      short: Debug
      long: Emit debug information and don't optimize
      buildType: Debug
    Release:
      short: Release
      long: Optimize generated code
      buildType: Release
board:
  default: NUCLEO-F303RE
  choices:
    YOUR_MBED_TARGET:
      short: NUCLEO-F303RE
      settings:
        MBED_TARGET: NUCLEO-F303RE
        # Fill your upload method according to variants below
        # - universal: NONE, MBED, JLINK, PYOCD, OPENOCD
        # - target specific: STLINK, STM32CUBE, LINKSERVER, PICOTOOL, ARDUINO_BOSSAC
        # For more visit - https://github.com/mbed-ce/mbed-os/wiki/Upload-Methods#upload-method-list
        UPLOAD_METHOD: STM32CUBE

Folders like

  • vscode will be created automatically after first correct cmake run .
  • build will be created automatically with first build run .

BR, Jan

cmake_minimum_required(VERSION 3.19)
cmake_policy(VERSION 3.19)

Initialize Mbed OS build system.

Note: This block must be before the include of app.cmake

set(MBED_APP_JSON_PATH mbed_app.json5)

include(mbed-os/tools/cmake/app.cmake)
add_subdirectory(mbed-os)

project(MyMbedApp)

add subdirectories and build targets here

mbed_finalize_build()

add_executable(MyProgram MyProgram.cpp)
target_link_libraries(MyProgram mbed-os) # Can also link to mbed-baremetal here
mbed_set_post_build(MyProgram)

buildType:
default: Develop
choices:
Develop:
short: Develop
long: Emit debug information but also optimize
buildType: Develop
Debug:
short: Debug
long: Emit debug information and don’t optimize
buildType: Debug
Release:
short: Release
long: Optimize generated code
buildType: Release
board:
default: NUCLEO_F303RE
choices:
NUCLEO_F303RE:
short: NUCLEO_F303RE
settings:
MBED_TARGET: NUCLEO_F303RE
UPLOAD_METHOD: MBED

image

I do not know what this is
image

The rest looks good to me.
Try to perform this

  1. select GCC
  2. select target

and after your target is choosed then you will see something in your output panel and this is what we need to see.

BR, Jan

Hello, Jan.
What do you think about Platformio plugin and Mbed?

Hello,

I do not have personal experiences Platformio but i do not want to use a platform that just collect another platforms and use them.
For example Arduino uses MbedOS under hood for ARM based boards - Portenta H7, Arduino nano 33 BLE, RPI Pico. The Platformio uses Arduino library that uses MbedOS uder hood… this is ideal model, right? :slight_smile:

BR, Jan