Giter VIP home page Giter VIP logo

Comments (9)

MockbaTheBorg avatar MockbaTheBorg commented on August 21, 2024 2

Port complete.

from runcpm.

MockbaTheBorg avatar MockbaTheBorg commented on August 21, 2024

Tried this one as well: https://github.com/stm32duino/Arduino_Core_STM32
No luck so far.

from runcpm.

MockbaTheBorg avatar MockbaTheBorg commented on August 21, 2024

I was able to port RunCPM to the STM32F4DISCOVERY board.
It is still unstable, but with promising results.
The steps to implement are:

1 - Install Arduino STM32 core from https://github.com/stm32duino/Arduino_Core_STM32 via the package manager.
2 - Install FatFs and STM32SD libraries via the library manager.
3 - Edit the stm32f4xx_hal_conf.h file for the board and uncomment #define HAL_SD_MODULE_ENABLED
4 - Edit the ffconf_default_68300.h file from the STM32SD library and set #define _FS_TINY 1
5 - Build, install.
6 - Plug a serial adapter to PA2 (TX) and PA3 (RX)
7 - Press reset (black) button.

RunCPM should show the greeting.

At this point I am not 100% sure of the correct operation of the file system, so be aware that file corruption can occur.

from runcpm.

MockbaTheBorg avatar MockbaTheBorg commented on August 21, 2024

Further investigation leads me to think there's a memory leak on the SD card handling.
Multiple DIR commands lead to a crash ...

So far I was not able to replicate.

from runcpm.

MockbaTheBorg avatar MockbaTheBorg commented on August 21, 2024

STM32 board back to the drawer for now. Maybe I will revisit in the future if there's free time.

from runcpm.

linker3000 avatar linker3000 commented on August 21, 2024

Any tips for compiling for the STM32F411 Nucleo?

I have followed the instructions for setting up the discovery board (above)
and found/confirmed every settings change, but when I compile with 'Board Nucleo-64' and 'part number Nucleo F411RE', the compilation fails at "PD13 was not declared in this scope"..

#if defined _STM32_DEF_ // STM32 boards
  SdFatSoftSpiEX<PC8, PD2, PC12> SD; // MISO, MOSI, SCK
  #define SDINIT PC11 // CS
  #define LED PD13  <<<<<< 

Is this setup missing a pin definition file?

Thanks

from runcpm.

MockbaTheBorg avatar MockbaTheBorg commented on August 21, 2024

from runcpm.

linker3000 avatar linker3000 commented on August 21, 2024

from runcpm.

linker3000 avatar linker3000 commented on August 21, 2024

Working on the STM32F411 Nucleo!

STM code section below. Once running, the tty comes through the embedded ST-Link interface apparently fine and I can see the console in the Arduino IDE or using minicom.
See the note in the code about the SD card activity LED.


  #if defined _STM32_DEF_ // STM32 boards

    // Important note - Arduino IDE build options for Nucleo board:
    //   U(S)ART Support: Enabled (Generic 'Serial')
    //   USB Support (if available): CDC (no generic 'Serial')
    
    // F411RE uses MISO = PA6 (D12), MOSI = PA7 (D11), SCK = PA5 (D13) 
    // (See note about LED below), CS = PB6
    SdFatSoftSpiEX<PA6, PA7, PA5> SD; // MISO, MOSI, SCK
    #define SDINIT PB6 // F411RE uses CS = PB6 (D10)

   #define LED PA8 // STM32F411 Nucleo has an LED on PA5 (SCK), which will flash during SD access. 
                // Application-controlled LED now reassigned to a different
                // pin so we don't drive the SCK line. Stick an LED + resistor
                // on it if you want two LEDs for SD access! PA8 is Arduino pin D7

    #define LEDinv 0 // 0=normal 1=inverted
    #define BOARD "STM32F411 Nucleo"

from runcpm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.