TinyCLR_CortexM4 source code

Can I looking the TinyCLR_CortexM4.lib source code?

What are you planning on doing with it?

I want to try porting to some device. e.g. http://wiki.seeed.cc/Wio_Tracker_LTE_CAT1/
I think it is necessary to examine the bootloader and the debug port.

It is similar to netduino/fez boards you just need to use code from device (fez) and modify it by needs as i did for nucleo stm32f411ret6 and use with cerb bootloader if i’m not wrong.

You can do that today, and very easily. Start here http://docs.ghielectronics.com/tinyclr/porting/intro.html

1 Like

Everything you said is correct except no bootloader. The bootloader is only for GHI Electronics products. Just see the netduino3 instructions for example.

1 Like

i port STM32F411RET6 nucleo - and with DFU Manager i generated DFU file
uploaded onto board on DFU mode and nothing happened based into instructions on the web

but i still can not use it without FEZ bootloader
(or it doesnt recognized from my pc) or i’m doing something wrong

or what i need extra thing to use it without Fez bootloader :slight_smile:

What you need is a better documentation. We are working on that.

2 Likes

i did it

enough to modify tinyclr_scatter_file_gcc.ldf


part from :

MEMORY
{
IRAM : ORIGIN = 0x20000000, LENGTH = 0x00020000
LR_FLASH : ORIGIN = 0x08008400, LENGTH = 0x00037C00 //modified part
LR_CONFIG : ORIGIN = 0x08004000, LENGTH = 0x00004000
}
SECTIONS
{
ER_FLASH 0x08008400 : //modified part
{

to :

MEMORY
{
IRAM : ORIGIN = 0x20000000, LENGTH = 0x00020000
LR_FLASH : ORIGIN = 0x08000000, LENGTH = 0x00037C00 //modified part
LR_CONFIG : ORIGIN = 0x08004000, LENGTH = 0x00004000
}
SECTIONS
{
ER_FLASH 0x08000000 : //modified part
{

now it recognized by pc and dfu mode uploaded in 0x08000000 no in 0x08004000

so how i see in FEZ scatteredfile is enough to change

LR_FLASH and ER_FLASH to have address 0x08000000
instead 0x08004000 to use included bootloader in the generated firmware

4 Likes

You are becoming a TinyCLR master

1 Like

finally i port and modified TinyCLROS properly for NUCLEO STM32F411RET6 to boot without FEZ Bootloader

so now i’m going to publish last changes and to add class for hardware in C# (for pins/and elements for board)

what the people do not understand during porting

  • meaning of tinyclr_scatter_file_gcc.ldf and their declaration on top (missing documentation)
  • meaing of DeviceSelector.h and how to calculate things and do mapping based on hardware documentation

last updated link for nucleo which work as expected now

4 Likes

just published the other documents that helped me to port TinyCRLOS into - NUCLEO STM32F411RET6

on the link

https://github.com/valoni/TinyCLR-Ports/tree/master/Devices/NUCLEO411RET6/Helps

  • include STM32F411 doc from STM Electronics
  • include Picture From Google
  • include Pin maps from mbed
  • include firmware ready for use (compiled from me and us as is without warranty)
  • include C# helper file / with sample to begin

but keep in mind i’m not hardware level proficient since i am software developer :slight_smile:

so i tried the best of me from what i learn in this forum thanks to people which doesn’t hesitate to answer to my questions.

I’m going to maintain this how long is allowed

  • next step is porting drivers from “Arduino Sensors - with sample for usage” to TinyCLROS

so if anyone already done (created drivers for TinyClrOs) please provide links and the samples and for some already drivers which was done in this forum for .NET MF 4.3.x we just need to turn/switch them into TinyCLROS way.

4 Likes

Wow! Great work!

I have one question.
Can we change debug port? USB1 to UART.
I do not know how to rewrite deviceselector.h

1 Like

@Gus_Issa

I mean this question is for you

Also i have similiar question too can i use usb0 instead of usb1 on discovery stm407vgt6

(since my otg part do not work) to use st-link usb connector for debug and to upload bootloader with st-link programmer

Take a look at G30. It uses a mode pin to change USB to serial.

1 Like

Please can provide more info
since there not doc yet

How to switch from usb to uart
And which pins to connect for uart
And any other info regards debug/deploy via uart

Thanx a lot

regard to an old problem
https://www.ghielectronics.com/community/forum/topic?id=24207

did is enoug defination of this to use with serial on STM32F407vgt6 for use RX= PA3, TX= PA2 or need something another via FTDI232RL connector

'#define DEBUG_TEXT_PORT USART2 //instead USB1
'#define STDIO USART2 //instead USB1
'#define DEBUGGER_PORT USART2 //instead USB1
'#define MESSAGING_PORT USART2 //instead USB1
'#define LMODE_PIN _P(B,10)
'#define LMODE_USB_STATE TinyCLR_Gpio_PinValue::High

// Loader
'#define RUNAPP_PIN _P(C,13)
'#define RUNAPP_STATE TinyCLR_Gpio_PinValue::High

'#define UART_DEBUGGER_INDEX 0
'#define USB_DEBUGGER_INDEX 0

hi @Gus_Issa

are you alive (or still busy with creation of docs before August,1)

i’m waiting for any answer(or not) about UART instead USB1 :stuck_out_tongue:

I am sorry, I have 10001 things to complete by Monday :wink:

Question for you: Nucleo F401 board, does it have 8Mhz crystal? Meaning the FEZ firmware will simply work on it?

Can you please start a new thread with your Nucleo board work? Explain how to add a USB connector/cable and where to get your code/firmware?

I would like to add this to the documentation please. You already have all this but it is not in one topic.