Main Site Documentation

TinyCLR_CortexM4 source code


#1

Can I looking the TinyCLR_CortexM4.lib source code?


#2

What are you planning on doing with it?


#3

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.


#4

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.


#5

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


#6

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


#7

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:


#8

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


#9

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


#10

You are becoming a TinyCLR master


#11

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


#12

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.


#13

Wow! Great work!

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


#14

@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


#15

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


#16

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


#17

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


#18

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:


#19

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?


#20

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.