PORT of TinyCLR for Nucleo STM32F411RET6 - MB1136 rev.C

PORT of TinyCLR for Nucleo STM32F411RET6 - MB1136 rev.C

I tried to port TinyCLR for Nucleo STM32F411RET6 - MB1136 rev.C

all what i did is
modification to meet configuration of Nucleo STM32F411RET6 board

into files :

DeviceSelector.h
tinyclr_scatterfile_gcc.ldf

uploaded
https://drive.google.com/drive/folders/0B5LeqLuG9sGGS0hMZHZ2bm9mTFE?usp=sharing

this ones are mapped with nucleo board pins from schema


and

other files remain as is (compiled and uploaded successfully for use on my STM32F411RET6 board and tested with blinky sample for now succesfully , tested timer and debug too everything gone well)

used with FEZ Bootloader.2.0.3.dfu bootloader (can this code be shared)

on batch file could explain someone what mean those parameters

SET ImageGenParameters=0x884DED08 0x3671259A 0x08008000 0x00038000
1 Like

So does that mean you have it working? We will need to have a common public place on GitHub for all of you to share the community ports. However, we are still changing things so next release will break your changes.

Those are used to generate the files needed by our bootloader, like addresses, magic numbers, and more magic numbers :wink: Just keep as is if you are using the FEZ bootloader.

Of course, you can skip the bootloader and load directly to address 0x00 and you will not need any of these numbers.

1 Like

on build.bat

ELSE (IF “%Device%” == “NUCLEO411RET6” (
SET ProcessorPart=STM32F4
SET ProcessorArchitecture=CortexM4
SET ImageGenParameters=0x884DED08 0x3671259A 0x08008000 0x00038000
) ELSE (IF “%Device%” == “G30”

ssuccefully compiled :slight_smile:

2 Likes

Super easy to port :slight_smile: You are doing it with minimal documentation. Now, compare that to NETMF :scream:

1 Like

YEEEEEESSS

NETMF is nightmare - TinyCLR OS super Freakin’ Easy :slight_smile: compare with it

Great! Now can you please tell everyone in this community how long does your PC need to compile the firmware?
… You are welcome :sunglasses:

1 Like

On fast PC take 5 seconds (i7)

on slow pc Core2Duo is going 7 (of course and it was seconds)

things what i loved is three kind of file generated (HEX , BIN and GLB) for withing seconds

2 Likes

Does the compiler use multiple core machines to compile?

I just clicked batch file as is and it done compile (so how it was compiled i’ve not checked)

  • single or multiple core

just follow instructions from

http://docs.ghielectronics.com/tinyclr/porting/intro.html

1.Cloned the ports repo to my computer.

  • this i did and modified file to meet configuration for Nucleo STM32F411RET6

2.Downloaded and installed GCC. Version 6-2017-q2-update.

3,Downloaded and extract the contents of CMSIS into the CMSIS folder of the cloned repo.

4.Downloaded and extracted the latest TinyCLR OS Core Library into the Core folder of the cloned repo.

5.Modified buid.bat and on command prompt executed build.bat NUCLEO411RET6.
(the last step if you already have done all 4 steps - after click it will finish - from 5 to 10 seconds depend of your machine)

Created a fork

For Nucleo STM32F411RET6

As community contribution (to use with
Fez bootloader )

1 Like

NEWS about

LAST Updated Port With Last Sources (path remain the same)
thanx @matsujirushi and
thanx to GHI Team which applied recommends/changes

now we have ability throught Nucleo those

  • upload of firmware can be done with ST-Link Utility (no need more DFU) or direct on mBED Drive
  • debug/deploy can be done by use of ST-LINK virtual port through original ST-LINK Mini USB
    (which act as SERIAL - VIRTUAL COM)

because of that - we have to disable USB CLIENT by comment it
and we need STM32F4_UART_CTS_PINS and STM32F4_UART_RTS_PINS for PA2,PA3 to set their values to GPIO_NONE on DeviceSelector.h

so we have a questions because we need to reconfigure PA11,PA12 as simple UART
and to set values for STM32F4_UART_CTS_PINS and STM32F4_UART_RTS_PINS and for other UARTS if needed too.

so we need more info how was USART was designed for TinyCLR OS and

DID USART6 mean USART6 as STM32 declared or as TinyCLR matrix declared

1 Like

In TinyCLR going forward device peripheral names are meant to match what the processor manufacturer calls them. So TinyCLR USART6 should be STM32 USART6.

Thanx for answer
reason why i asked is that
Nucleo STM32F411RET has 3 UART (UART1,UART2, and UART6)

and if i did more than 2 (it cause problem with selection of UART6 because in order was defined UART3)
on file STM32F4_USART.cpp it cause problem on

static UartController g_UartController[TOTAL_UART_CONTROLLERS];

// IO addresses
#if TOTAL_UART_CONTROLLERS > 3
static const USART_TypeDef_Ptr g_STM32F4_Uart_Ports[] = { USART1, USART2, USART3, UART4, UART5, USART6, UART7, UART8 };
#else
static const USART_TypeDef_Ptr g_STM32F4_Uart_Ports[] = { USART1, USART2**, USART6 };**
#endif

than i break source in generally but allow to compile for Nucleo after some modifications on it
so we need to find and better solutions when we need adding more than 2 but less than 8 UART

Even if a device doesn’t expose a given UART, they can still be present in the array. So if you want to use USART6, just set the pins for USART3, UART4, and UART5 to GPIO_PIN_NONE.

Nice it’s cool idea i will test this way