RetroBSD

2.11BSD operating system for microcontrollers
It is currently Mon Sep 24, 2018 11:51 pm

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: STM32F7 discovery kit
PostPosted: Fri Sep 18, 2015 6:17 pm 

Joined: Sun Mar 22, 2015 4:36 pm
Posts: 12
http://www.st.com/web/en/catalog/tools/ ... scovery-pr

Looks pretty nice, and it has the built-in LCD (4.3") too. It looks like it runs STM32F7Cube, which possibly includes a RTOS?

This looks like it would be great to run RetroBSD on, provided there is an stm32 port. I saw an stm32 port mentioned a while back, but not sure if anyone got around to actually porting it yet. I think RetroBSD would be very useful, as the LCD could be used with a console framebuffer to use it with "standard" command-line mode.

It would be nice to have stm32f7 up and running.


Top
 Profile  
 
PostPosted: Sat Sep 19, 2015 9:25 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1079
Location: Sunnyvale, CA
It would be great to port RetroBSD to Cortex-M architecture.
We just need somebody who could take the lead.

Here is a quote from my old post 2012-Apr-10 with some hints.
Quote:
RetroBSD was developed with a portability in mind. Most of the kernel is architecture-independent (sys/kernel, sys/include). There is a small number of places, where a saved stack frame is directly referenced (look for u.u_frame) - it needs to be guarded by #ifdefs.

PIC32-related part of the kernel is placed in sys/pic32 directory. I would recommend to create sys/stm32 directory for this port. Some drivers, like SD card, console, GPIO or ADC probably could be moved to arch-independent place, say sys/drivers. Unfortunately, we cannot reuse USB stack (Microchip's copyright is too restrictive).

You can use sys/pic32/baremetal/Makefile configuration as a starting point, for simplicity. The challenge is to build a kernel, which can start and print a message on console. Copy a basic set of arch-dependent files from sys/pic32 to sys/stm32, and modify them (cpu.h, io.h, limits.h, machparam.h, startup.S, clock.c, cons.c, devsw.c, exception.c, machdep.c, mem.c, signal.c, sysctl.c). Design a memory map and create a linker script. All we need from MPU is to protect a kernel data region from the user programs.

Next step is to design a user/kernel API: how to pass args to syscalls and get returned data. This will help to build a syscall library (src/libc/thumb2/sys). All other assembler files can be ported from NetBSD or other sources.

A year ago there was some related activity on getacoder.com, but seems like it ended in nothing.
http://www.getacoder.com/projects/retro ... 63817.html


Top
 Profile  
 
PostPosted: Sat Sep 19, 2015 2:04 pm 

Joined: Sun Mar 22, 2015 4:36 pm
Posts: 12
Thanks for the reply. It's probably best to take a look at the NetBSD sources, like you suggested. And the other thing is the LCD, which would require its own driver. It's a shame that this port stagnated before it could get off the ground.

Some people have speculated that it's a matter of time until Microchip ditches mips and adopts the arm architecture eventuallly, but it seems unlikely, as they (Microchip) have a lot of development time and money invested in their own mips-based proprietary architecture.

http://www.microchip.com/forums/m601857.aspx


Top
 Profile  
 
PostPosted: Sat Sep 19, 2015 2:34 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Why do you need an ARM from Microchip? There is plethora of ARM MCU producers, so you may choose..
The major point with retrobsd implementation was the ram size in the past. 5y back - as the retrobsd started - the only chip with 128kB ram available (from which you can execute a program) was the pic32mx695/795.
So porting retrobsd to ARM cannot be a problem today, provided you posses a know-how and time for such an exercise :)
I would rather plead for a retrobsd port to the pic32MZ, though.. :P
That could be a good starting point for any talented programmer - afterwards you may port to CM4 or CM7 easily.

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Tue Sep 22, 2015 4:25 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1079
Location: Sunnyvale, CA
Here is a good ARM target board for RetroBSD:

http://www.adafruit.com/products/2390

Image


Top
 Profile  
 
PostPosted: Tue Sep 22, 2015 7:02 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
The only "issue" with stm32F4xx (I like much) is the ram is split into 128kB + 64kB.
Not sure we can execute from those 64kB ram (so called CCM). Also no DMA to the CCM. Good for various buffers, however.

There are newer 32Fxx parts btw, with 256kB+ ram (F7 is 256kB + 64kB + 16kB + 4kB of ram). None model with 512kB chunk of ram yet.

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Mon Sep 28, 2015 7:21 pm 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1079
Location: Sunnyvale, CA
Pito wrote:
The only "issue" with stm32F4xx (I like much) is the ram is split into 128kB + 64kB.
Not sure we can execute from those 64kB ram (so called CCM). Also no DMA to the CCM. Good for various buffers, however.

There are newer 32Fxx parts btw, with 256kB+ ram (F7 is 256kB + 64kB + 16kB + 4kB of ram). None model with 512kB chunk of ram yet.

That's a good question, which part of RAM is executable.
The other topic is how to protect the kernel space from user space.


Top
 Profile  
 
PostPosted: Tue Sep 29, 2015 12:11 pm 

Joined: Sun Mar 22, 2015 4:36 pm
Posts: 12
The Pyboard looks really nice. Embedded python isn't so bad. It's better than compiling a project and sending it to the board every time you want to run something. But how would you get RetroBSD to the board? Like this (Device Firmware Update mod)?

https://github.com/micropython/micropyt ... are-Update


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron




Powered by phpBB® Forum Software © phpBB Group

BSD Daemon used with permission