Giter Club home page Giter Club logo

chettrick / discobsd Goto Github PK

View Code? Open in Web Editor NEW
160.0 160.0 15.0 68.53 MB

2.11BSD-based UNIX-like OS for STM32 and PIC32 Microcontrollers

Home Page: http://www.DiscoBSD.org

License: BSD 3-Clause "New" or "Revised" License

Makefile 1.97% Shell 0.20% C 83.52% Assembly 0.58% Forth 0.69% Scheme 0.01% Roff 11.35% Yacc 0.97% Lex 0.30% HTML 0.17% M4 0.07% CSS 0.03% Brainfuck 0.01% Awk 0.03% Perl 0.03% Modelica 0.01% sed 0.01% Logos 0.01% Python 0.02% BASIC 0.02%
211bsd arm bsd c cortex-m discobsd embedded microcontroller operating-system pic32 stm32 unix

discobsd's People

Contributors

amarkee avatar chettrick avatar lhondareyte avatar saper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

discobsd's Issues

Support inexpensive WeAct Studio STM32F4 Core boards

There is a new (?) cheap board family available via aliexpress, which could be a nice candidate for porting.

It is sold under the name "WeAct STM32F405RGT6 STM32F412RET6 STM32F446RET6 STM32F405 STM32F412 STM32F446 STM32F4 STM32 Core Board Demo Board Micropython" and it is sold under US$5.

Please consider to port DiscoBSD to this board.

Specs:

STM32F412RET6

STM32 Dynamic Efficiency MCU with BAM, High-performance and DSP with FPU, Arm Cortex-M4 MCU with 512 Kbytes of Flash memory, 100 MHz CPU, Art Accelerator, DFSDM

STM32F446RET6

High-performance foundation line, Arm Cortex-M4 core with DSP and FPU, 512 Kbytes of Flash memory, 180 MHz CPU, ART Accelerator, Dual QSPI

STM32F405RGT6

High-performance foundation line, Arm Cortex-M4 core with DSP and FPU, 1 Mbyte of Flash memory, 168 MHz CPU, ART Accelerator

DataLink

https://github.com/WeActStudio/WeActStudio.STM32F4_64Pin_CoreBoard.git


There are other alternative boards from the same company, the "WeAct STM32H723VGT6 STM32H723 STM32H7 STM32 Core Board Demo Board" looks pretty nice aswell

atc won't build

Hi,

I'm having difficulty building DiscoBSD because this builds /games/atc, which fails on my system.

Here is the some of the output of gmake

gmake -C atc -w
gmake[2]: Entering directory '/home/sam/proj/discobsd/games/atc'
/usr/bin/arm-none-eabi-gcc -mcpu=cortex-m4 -mabi=aapcs -mlittle-endian -mthumb -mfloat-abi=soft -nostdinc -I/home/sam/proj/discobsd/include  -N -nostartfiles -fno-dwarf2-cfi-asm -T/home/sam/proj/discobsd/lib/elf32-arm.ld /home/sam/proj/discobsd/lib/crt0.o -L/home/sam/proj/discobsd/lib -o atc.elf extern.o grammar.o input.o lex.o list.o log.o main.o tunable.o graphics.o update.o -lm -lcurses -ltermcap -lc
/usr/lib/gcc/arm-none-eabi/10.3.1/../../../arm-none-eabi/bin/ld: /home/sam/proj/discobsd/lib/libm.a(sqrt.o):(.bss+0x0): multiple definition of `errno'; /home/sam/proj/discobsd/lib/libm.a(asin.o):(.bss+0x0): first defined here
/usr/lib/gcc/arm-none-eabi/10.3.1/../../../arm-none-eabi/bin/ld: /home/sam/proj/discobsd/lib/libcurses.a(cr_put.o):(.bss+0x18): multiple definition of `_win'; /home/sam/proj/discobsd/lib/libcurses.a(refresh.o):(.bss+0x4): first defined here
/usr/lib/gcc/arm-none-eabi/10.3.1/../../../arm-none-eabi/bin/ld: /home/sam/proj/discobsd/lib/libtermcap.a(tgoto.o):(.bss+0x50): multiple definition of `BC'; /home/sam/proj/discobsd/lib/libcurses.a(curses.o):(.bss+0x104): first defined here
/usr/lib/gcc/arm-none-eabi/10.3.1/../../../arm-none-eabi/bin/ld: /home/sam/proj/discobsd/lib/libtermcap.a(tgoto.o):(.bss+0x4c): multiple definition of `UP'; /home/sam/proj/discobsd/lib/libcurses.a(curses.o):(.bss+0x3c): first defined here
/usr/lib/gcc/arm-none-eabi/10.3.1/../../../arm-none-eabi/bin/ld: /home/sam/proj/discobsd/lib/libtermcap.a(tputs.o):(.bss+0x2): multiple definition of `PC'; /home/sam/proj/discobsd/lib/libcurses.a(curses.o):(.bss+0x10): first defined here
/usr/lib/gcc/arm-none-eabi/10.3.1/../../../arm-none-eabi/bin/ld: /home/sam/proj/discobsd/lib/libtermcap.a(tputs.o):(.bss+0x0): multiple definition of `ospeed'; /home/sam/proj/discobsd/lib/libcurses.a(cr_tty.o):(.data+0x0): first defined here
/usr/lib/gcc/arm-none-eabi/10.3.1/../../../arm-none-eabi/bin/ld: /home/sam/proj/discobsd/lib/libc.a(exit.o):(.bss+0xc): multiple definition of `errno'; /home/sam/proj/discobsd/lib/libm.a(asin.o):(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
gmake[2]: *** [Makefile:25: atc] Error 1
gmake[2]: Leaving directory '/home/sam/proj/discobsd/games/atc'
gmake[1]: *** [Makefile:19: atc] Error 2
gmake[1]: Leaving directory '/home/sam/proj/discobsd/games'
gmake: *** [Makefile:52: all] Error 2

I can see that /sbin/fsck is having a similar problem. But I can't paste the full output of gmake here since there's a 64K limit.

I imagine this means that linking works a little differently on my system. As you know I fixed another game on that pull request.

Maybe atc and others need to be fixed in the same way, or maybe there's a flag or something I can set. I'd be interested to know what to do! I'm happy to file more pull requests as and when I figure it out if that's what you'd like.

share/zoneinfo: use gcc

When building on FreeBSD 14, "cc" is clang 16. This makes the build fail like this:

cd zoneinfo; make  
cc  -O -g -Wall -Werror -idirafter /big/sw/discobsd/include -c zdump.c -o zdump.o
zdump.c:26:1: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
show(zone, t, v)
^
zdump.c:48:1: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
readerr(fp, progname, filename)
^
zdump.c:61:1: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
tzdecode(codep)
^
zdump.c:74:1: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
main(argc, argv)
^
4 errors generated.

quick fix is this:

diff --git a/share/zoneinfo/Makefile b/share/zoneinfo/Makefile
index 7cfd33b..82ed5d9 100644
--- a/share/zoneinfo/Makefile
+++ b/share/zoneinfo/Makefile
@@ -20,7 +20,7 @@ LOCALTIME=    US/Pacific
 
 CFLAGS= -O
 LINTFLAGS=     -phbaxc
-CC=            cc
+CC=            gcc
 CFLAGS+=       -g -Wall -Werror -idirafter $(TOPSRC)/include
 
 TZCSRCS=       zic.c scheck.c ialloc.c

Instead, I could also add -Wno-deprecated-non-prototype but to CFLAGS, but not all compilers might know this.

sd0: no SD/MMC card detected on F4DISCOVERY

Hello,
On a F4DICOVERY, sd card is not detected, with this message:

2.11 BSD UNIX for STM32, rev G290 #6: Thu Feb 23 17:23:34 CET 2023
     luc@unxbox:/home/luc/discobsd/sys/stm32/f4discovery
cpu: STM32F407xx rev VGT6, 168 MHz, bus 48 MHz
oscillator: phase-locked loop, clock source: high speed external
uart2: pins tx=PA2/rx=PA3, af=7, console
sd0: port spi2
sd0: cannot open spi2 port
sd0: no SD/MMC card detected
panic: No root filesystem found!
no fs on dev (0,1)
syncing disks... done
halted
press any key to reboot...

I am using this adapter connected as follow:

    CS    <-   PB12
   SCK    <-   PB13
  MISO    ->   PB14
  MOSI    <-   PB15

The SD card is a lexar 16Go.
Any help will be apprecied.

kconfig: /usr/bin/ld: multiple definition of `debugging`

This is gcc 11.3.1 on Almalinux 9, GNU ld 2.35.2

same with gcc 11 on FreeBSD

make[2]: Entering directory '/home/saper/src/discobsd/tools/kconfig'
gcc -g  -o kconfig config.o main.o lang.o mkioconf.o mkmakefile.o mkswapconf.o 
/usr/bin/ld: main.o:/home/saper/src/discobsd/tools/kconfig/config.h:180: multiple definition of `debugging'; config.o:/home/saper/src/discobsd/tools/kconfig/config.h:180: first defined here
/usr/bin/ld: main.o:/home/saper/src/discobsd/tools/kconfig/config.h:171: multiple definition of `dtab'; config.o:/home/saper/src/discobsd/tools/kconfig/config.h:171: first defined here
/usr/bin/ld: main.o:/home/saper/src/discobsd/tools/kconfig/config.h:176: multiple definition of `conf_list'; config.o:/home/saper/src/discobsd/tools/kconfig/config.h:176: first defined here

I fixed this with the following for now:

diff --git a/tools/kconfig/Makefile b/tools/kconfig/Makefile
index 42cb1cb..2b0eb56 100644
--- a/tools/kconfig/Makefile
+++ b/tools/kconfig/Makefile
@@ -1,5 +1,6 @@
 CC             = gcc -g
 CFLAGS         = -O -Wall -Werror
+LDFLAGS                = -z muldefs
 
 _HOST_OSNAME!= uname -s
 

but I think this is not a best change probably a linker script might be needed here...

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.