BreadBee is a Tiny Embedded Linux SBC based on MStar MSC313E Camera SoC (Crowdfunding)

There are plenty of tiny and compact Arm Linux SBC on the market from NanoPi NEO to Raspberry Pi Zero or Rock Pi S. But Daniel Palmer has been able to design an even smaller board – BreadBee – based on MStar MSC313E Cortex-A7 SoC since the processor also embeds 64MB RAM, or enough to run embedded Linux.BreadBeeBreadBee specifications:

  • SoC – MStar MSC313E Arm Cortex-A7 processor @ ~1.0 GHz with NEON, FPU, 64MB DDR2
  • Storage – 16MB SPI NOR flash
  • Networking – 10/100M Ethernet (RJ45)
  • USB – 1x Micro USB 2.0 port
  • Expansion
    • 24-pin dual-row header (2.54mm pitch) with  SPI, I2C, 4x 10-bit ADC, 3x UART, GPIOs
    • 21-pin header (1.27mm pitch) with SD/SDIO, USB 2.0, GPIOs
  • Misc – RTC, Watchdog timer
  • Power Supply – 5V via micro USB port
  • Dimensions – 32 x 30mm

Ethernet Linux SBC

Despite MStar MSC313E being a camera processor, the camera interface does not seem exposed in the board, so it looks to be designed to control I/Os over Ethernet. There’s no WiFi for now, but there may eventually be a future model that replaced the Ethernet jack with an Ampak WiFi module.

Daniel also considered the similar Allwinner V3s processor, but the single SPI interface would have been utilized by NOR flash, and MSC313E has multiple SPI interfaces. He ported Linux 5.3 to the board with most features working, but still several requiring more work including the MUSB USB device controller, H.264 encoder, Audio ADC/DAC, and Crypto engine among others. The hardware has been designed in KiCad, and you’ll find hardware resources files, a project log, and links to U-Boot, Linux, and Buildroot repositories on Github.

blinky demo
Blinky demo

BreadBee board will soon be launched on Crowd Supply, and the cost to make the board is said to be around $10 in small quantities. I think Daniel is a regular reader and commenter on CNX Software and may be able to answer any questions here.

Via Hackster

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard

61 Replies to “BreadBee is a Tiny Embedded Linux SBC based on MStar MSC313E Camera SoC (Crowdfunding)”

    1. *edit* – Didn’t mean to make this a reply.

      Ethernet works just fine…

      $ uname -a
      Linux breadbee 5.6.0+ #2378 Mon Apr 13 22:17:10 JST 2020 armv7l GNU/Linux

      [ 0.193861] libphy: Fixed MDIO Bus: probed
      [ 0.195781] libphy: MACB_mii_bus: probed
      [ 0.196832] macb 1f2a2000.emac eth0: Cadence MACB rev 0x00000000 at 0x1f2a2000 irq 48 (be:e8:98:09:13:90)

    1. Performance wasn’t the real aim here. It was about running stuff like python with memory protection etc on a chip that can be used by tinkering types on their own cheap 2 or 4 layer boards.

    2. To start with, if you’re using either of those boards for compute heavy tasks, you’ve already made a mistake in board selection. The point of both boards is to allow experimenters to interface with various kinds of hardware while running a full up Linux environment.

      That said, you’ll likely get better performance out of an A7 than an ARM11 at the same clock speed. But, if that’s your concern, you’ve already made a bad decision.

      The value of boards like this are their ease of programming and the openness of their software stack.

      1. >It is around the price of a friendlyarm ZeroPi, Jerry.

        Note that $10 is the cost to make one by yourself with a hot air rework station. The crowdsupply price won’t be that low as it’s simply not possible to source the components, get the boards built, shipped and pay crowdsupply’s cut for that. The hope for this was always that some Chinese company would come along and blue-pill the hell out of it so there’s no reason to put microcontrollers on the internet anymore.

        1. How low could a price of something like that be, if some chinese like orangepi would come aboard and start pumping those out? 5$?

    3. Actually, performance should be better, since this uses cortex a7 core, instead of the ARM11

  1. I’ve been lucky enough to have one of these boards for a number of months. I’d like to share my impressions of it.

    The software build environment is really well set up and is very easy to use. I have one little script that starts a build of all the software for the board and results in a set of image files for flashing to the SPI flash. It pulls all of the source fresh from github for you.

    The micro-USB connector both provides power to the board and provides a USBserial adapter to the SoC’s console UART. This makes power control pretty easy. If you have a device that has the ability to control the power to its USB ports, you can power off and on the board under developer control. That’s not practical with larger boards as they draw more current than a typical HOST port can provide.

    A lot has changed WRT supported peripherials in the time I have had the board, so I’ll let the wiki speak to the state of that.

    The goal of this project was to make a board that was breadboard friendly. In as much as the ethernet connector with integrated magnetics is comically large, I think Daniel did a very good job in that department. Later versions may come without the ethernet, but with an AMPAK module instead. But, for development, ethernet is generally faster, easier to debug, and more reliable, so it was the good decision to make at the time.

    There were other testers, so maybe some of them will come here to share what they found. Daniel, if I got anything wrong, please correct me and thank you for all of your hard work with this project.

      1. I guess you think this is shilling like a NordVPN advert or something…

        There’s no script as I never gave David one. I spoke to him on IRC about this after a comment thread here. He sounded interested so I sent him one. Just like I sent (I think) 4 or so other people that asked. I understand getting something for free adds a certain level of bias though. There’s not much I can do there. If you want a board or some chips to have a go and write a massive screed about it being a piece of junk the offer for freebies is on the github page. I just ask that if someone asks for one they actually do something with it as it takes an hour or more to hand assemble each one.

        For what it’s worth I explicitly stated in the application to crowdsupply that I sent in probably a year ago now that I wasn’t going to make any profit on this. The price will be the cost to make the board + crowdsupply’s cut. I might even end up out of pocket. The plan is to make ~2000 of them to cover the 2080 chips I have to order.. and to be honest I would prefer to just order 2080 of the chips, keep 100 for myself and sell the rest at cost instead of having to dick around with companies in china, crowd funding and then the inevitable complaining from people that bought a board expecting it to be faster than a top of the range core i9.

        The idea here is to get these sorts of chips out there. This same company has a ton of weird chips in packages you can solder at home. Even a dual core A9 with 128MB of RAM, SATA, HDMI etc in a QFN.

        1. Quoting: David Willmore

          >I have one little script that starts a build of all the software for the board and results in a set of image files for flashing to the SPI flash. It pulls all of the source fresh from github for you.

          That’s what Jay was asking about.

          I appreciate the expanded background on the idea though, so still an interesting comment.

          1. I hope so. I guess I’m too cynical.

            If they are asking about the script. The buildroot environment has a root makefile that can build everything. buildroot pulls in everything as it builds. On top of build root there’s a built in tftp server etc so you can flash the resulting files without anything else.

          2. Hello dgp,

            You seem like a smart fellow, this project is obvious proof of that. You don’t need to drop a wall-o-text at the drop of a hat to prove that, it comes across as reactionary, even when you are correct. I’ve seen you do it several times now, and even when you are right it takes away from the strength of your argument because you look like you’re puffing your chest out to prove your superiority. In this case you definitely were not correct, I don’t think anybody else misread that the way you did. Own your mistake instead of using language like “I hope so..” and moving on like it never happened, you did not apologize for flying off the handle at an innocent remark from somebody that honestly tested your product. That’s pretty rude.

        2. What a sexy little thing 🙂 Congratulations, dgp!

          > Even a dual core A9 with 128MB of RAM, SATA, HDMI etc in a QFN.

          That’s likely too early to discuss, but do you intend on designing similar boards with one of those A9 chips?

      2. LOL, it’s nothing complex, it just calls the already existing infrastructure that dgp mentioned. Behold:
        git pull origin master
        make

        and the occasional
        make clean

        1. But I’ve been building new versions for months. If you’re building it from scratch, the buildroot Readme.md file explains what you need to do in pretty good detail.

  2. The V3/V3S/S3/etc have h.264 decode and an LCD controller. That is a major difference compared to the MSC313E. The V3 chips can do two way video.

    The MSC313E is similar to the Ingenics T20. Recent Linux kernels are available for the T20 (4.9 I think). The T20 is very cheap. Downside is the BGA package. TFBGA181 ROHS, ball pitch of 0.65mm,body size of 10mmx10mm. The XBurst core in the T20 has an extended DSP instruction set. Those instructions allowed Wyse to implement AI vision features in their $20 cameras. The Wyse AI code is not open source but it should be possible to construct something similar since there are good matrix math libraries available for that DSP core in the T20.

    NEON in the A7 core has reasonable FPU performance but it is no where close to real-time. My image recognition code on the A7 takes about 0.7 seconds to process a single image. A chip like the RK1808 can run the same image processing around 100 times faster — faster than real-time.

    Note that a key feature missing from ARM GPUs is the ability to switch between being a GPU and a NPU like the NVidia RT2xxx series can do. Hopefully ARM will hurry up and release GPUs that are able to run matrix math more efficiently. Right now all of the common ARM GPUs are slower than using NEON on the main CPUs.

    1. >The V3/V3S/S3/etc have h.264 decode and an LCD controller.

      – The V3s is a PITA to work with. I made some modules with it and have them doing things but the whole reason I wasted so much time and money on this was exactly because the V3s wasn’t right for want I want to do.
      – The S3 can’t be soldered with a cheap hot air rework station easily
      – h.264 decode isn’t a must have feature for projects you might otherwise use an ESP32 for.

      >That is a major difference compared to the MSC313E. The V3 chips can do two way video.

      The MSC313E has 3 spi interfaces. One of them is memory mapped for NOR flash and can be read into memory by DMA. This means you can go from uboot to python3 very very quickly.

      >The MSC313E is similar to the Ingenics T20. Recent Linux kernels are available for the T20 (4.9 I think).

      Leaked 4.9 kernel is on my github which includes the glue code for the CEVA XM6 DSP/NPU thing that is in the newer versions of these chips.

      >The T20 is very cheap. Downside is the BGA package.

      BGA is no go for almost everyone that doesn’t have access to real equipment.

      1. That CEVA XM6 unit looks decent. I suspect the MSTAR chips incorporating it are all over $10 + DRAM? Similar to RK1808? Which chips have it?

        1. >That CEVA XM6 unit looks decent. I suspect the MSTAR chips incorporating
          >it are all over $10 + DRAM? Similar to RK1808? Which chips have it?

          The big list of chips on linux-chenxing.org has notes on which have the NPU. Some of them seem to be in these cheap <$10 IP board cameras so I don't think the chips are that expensive but without someone in China with a business license to get a direct quote it's hard to say.
          Also all of these chips seem to use the same die for all of the chips in that generation. So I suspect even the chips that don't have the NPU as a listed feature will still have the silicon in there.

    1. Currently ~100mA@5V idle and ~130mA when the processor is fully clocked.
      At the moment unused clocks aren’t turned off because the dependencies between all of them aren’t known yet.
      It should be a bit better once that’s worked out. With the processor turned off and just the DRAM in self-refresh it’s around ~10mA from what I remember. Alas I haven’t worked out how to get the processor to turn back on.

      For really low power linux the rock pi s is probably the best thing out there at the moment.

    1. Half the people complain it doesn’t have WiFi, the other half complain about not having PoE. Tough crowd.

      1. And wait, I haven’t complained yet about lack of GbE 🙂
        This is one of the coolest boards I’ve seen in a very long time. I’d even be tempted by trying to assemble one myself, but I don’t think I’d have any use for it, so better leave them to others.

        1. > I’d even be tempted by trying to assemble one myself,

          If you drop me a line via the email listed in github I can send you a parts kit. The only stipulation is that you don’t complain too much about JLCPCBs awful silkscreen and solder mask.

          1. Well initially I thought “no” but finally considering that I still have at least 4 weaks of containement to endure, I now thought “why not after all, it will be recreative”. And no, I’m not the type of guy who complains about such stuff (and it’s certainly 10 times better than the best I can do). In the worst case you’d get some feedback about improvement suggestions, a failure report with what’s causing trouble, a blog post about how cool and/or difficult it is, or a paypal donation (provide you accept them), so don’t worry 🙂
            PM’ing you now. Thanks!

          2. Just an update on this, Daniel sent me two boards and components to try to assemble. I experienced some difficulties given the very small pitch (0.35mm) and the solder mask of the first batch that didn’t completely isolate the SoC’s pads, but managed to finally get one to work. It really is a fun project to work on, especially when you look at it when it boots, seeing the tiny components and you think “wow, I did really solder that, and that shell over SSH confirms I did it correctly!” 🙂

            Thank you Daniel and I really wish you success with this awesome project! I encourage others who already have some experience with SMD soldering to give it a try.

    2. There are PoE splitters with a micro usb 5v output that would work.
      Alternatively if you can find a PoE splitter in a module or maybe a RJ45 jack with that integrated then you can fire up kicad and add it in.

  3. Can it interface wifi externally? Is there any provision to see debug logs over UART. Does test points provide UART pins

    1. >Can it interface wifi externally?

      The fine pitch header contains both usb and sd/sdio. A cheap USB dongle worked when I checked a while ago and an AMPAK SDIO module worked from what I remember.

      >Is there any provision to see debug logs over UART.

      The debug uart is connected to the ch340e. It should be possible to map it onto different pins if you want it on the header but the pinctrl driver can’t do that yet.

      >Does test points provide UART pins

      No, the test points are for the audio pins that I thought would never get used by had space so broke them out.

    2. To add to what dgp said, the debug UART of the SoC is already hooked to the ch340e USB to serial adapter which is hooked to the micro-USB port. To debug the board, you just plug some host into the micro-USB port and it appears as a serial adapter–then use whatever terminal you like from there.

  4. The article seems to emphasis this is a new “smallest” board, but from the reading the comments it sounds like the idea (vs. RockPi S or Nanopi Duo2) is that the board design is open and it’s simple enough that you could buy the components and make a custom board with all the “peripherals” you need – all on one PCB. Is that right?

    I think this is really cool 🙂

    I mean you could also breadboard a NanoPi Duo 2, but this is a bit more interesting and open-source-y – and with something like libmraa or whatever you could get people making hardware projects while using high level languages

    1. > you could buy the components and make a custom board with all the “peripherals” you need

      Or at a later stage not necessarily ‘you’ but some Chinese vendor who is able to mass produce ultra cheap boards based on this SoC so we can get rid of microcontrollers connected to the Internet and replace them with something running a real OS (with memory protection, sane TLS stack etc): https://github.com/breadbee/breadbee#motivations

      And the PoE requirement above pretty much outlines what’s also different here. If you have this requirement no need to wait until a mythical foundation produces an overpriced ‘PoE HAT’, simply (ask/hire someone to) fire up KiCad and do it. 😉

      Hopefully the BreadBee is the first step into a direction where a community around those MStar SoCs evolves.

    2. >board design is open and it’s simple enough that you could buy the components
      >and make a custom board with all the “peripherals” you need – all on one PCB. Is that right?

      Yes exactly. The problem is getting the main chip isn’t easy for most people. Crowdfunding a board is just a way to order enough chips to the make boards, enough for people that just want chips and hopefully open up a path to get more exotic Cortex A7s in QFN.

      1. Ah okay. given the other comments I think the messaging is throwing people off a bit. I get the appeal of a ready-to-go board, but given your goal, which is really cool and something no-one is doing right now, it might make sense to have a sort of “kit” DIY thing (at least in addition to a preassembled version) Or just a bag of components and bring-your-own-board. Otherwise people will look at it and see a Rock Pi S with a weird chip – which misses the point

        Wish I knew how to help! If you need any CMake magic then message me at username at qq.com – otherwise I’m not sure 🙂 Maybe a community TODO list would help haha

        1. >Ah okay. given the other comments I think the messaging is throwing people off a bit.

          I didn’t write any of this messaging here or on the hackster.io.
          My guess is hackster.io picked up on the prelaunch page just after crowdsupply put it live and put together a story. They didn’t contact me. If they had I would have made sure the intent was covered and I probably would have mentioned that taking the text and images from a GPLv3 licensed project isn’t a great idea. :p

          >Or just a bag of components and bring-your-own-board.

          I want a tier that is just bare chips. As long as the MOQ satisfied I don’t mind either way.. well less boards and more chips is better for me.

          >Otherwise people will look at it and see a Rock Pi S with a weird chip – which misses the point

          Yep I get it and I would say to those people “Please buy the Rock Pi S instead. Here is my 5.6+ tree that makes most of it work https://github.com/fifteenhex/linux/tree/rockpis .. in return please work out why it sometimes dead locks on boot!”. Anyhow one of the parts of the crowdsupply page will be a comparison to similar boards and that will state that this isn’t a replacement for those sorts of boards.

          >Wish I knew how to help!

          Can you do curses ui’s in python? I need something that works like Kconfig but allows multiple items to have negative dependencies ( depends on X = n) against each other to make them mutually exclusive. Native kconfig and the python re-implementation of it cannot handle circular dependencies like that but I need that make the devicetree overlay setup user friendly.

          1. I’m sorry to say, but I’ve never touched Python. Just did C++ for years and recently switched to Clojure/JVM

            Hope someone sees this and reaches out to you 🙂

      2. Did you approach Olimex to build and sell a run of these? If Olimex buys into the concept -poof! – crowd sourcing disappears and economy of scale replaces it.

  5. Is there any public documentation for this SoC (appart from the brief pdf)? I mean – you had to get the information for getting those peripherals working from somewhere. Do you have or plan to have some kind of a forum/chat/mailinglist where you could share your experience about this board? I would love to get some of those boards to hack with.

    1. >Is there any public documentation for this SoC (appart from the brief pdf)?

      Initially that product brief and the device tree from an existing firmware was all I had. That was enough to get Linux to boot to a shell. PWM was reverse engineered from some dmesg output, ethernet was worked out by googling the suspiciously good English comments in some uboot source… eventually I go hold of some SDKs and things were a bit easier. I think all of the information is in hand now it’s just a case of going through lots of incredibly bad vendor code to find it.

      >I mean – you had to get the information for getting those peripherals working from somewhere.

      The pinmuxing and gpio was almost entirely worked out with devmem to write to registers and a multimeter to see if pins were changing on this piece of junk -> https://raw.githubusercontent.com/fifteenhex/thumbee/master/photos/thumbee_firstboot.jpg

      >Do you have or plan to have some kind of a forum/chat/mailinglist
      >where you could share your experience about this board?

      linux-chenxing.org is where I’m putting everything.

      >I would love to get some of those boards to hack with.

      I’ll try my best.

      1. Thats incredible dedication.

        Without knowing how long parts will be available and what kind of support from Mediatek/SigmaStar , it’s difficult to use it in product.

        Any ideas about market price for this chip?

        It’s super easy to create chatroom on matrix using riot @ https://riot.im/app/#/welcome

        1. >Without knowing how long parts will be available and what kind of support from Mediatek/SigmaStar ,
          >it’s difficult to use it in product.

          Yes. I would not use this in a product you need to sell to the general public. However lots of dashcams and other e-waste sorts of products even in the west have these chips in them. A bunch of the xiaomi security cams have this exact chip in them.

          >Any ideas about market price for this chip?

          I can tell you where you can get a quote for the direct pricing but you need to be a registered business in China with the right sort of business license to get any response. I paid someone to China to research it for me. But IP camera modules with these chips are ~$5 in total. These chips have to be cheap to add a sensor etc and some markup to sell them for $5. There are cameras with the 128MB version this chip for around the same money too.

          Don’t base any business decisions on that information though.

          >It’s super easy to create chatroom on matrix using riot @ https://riot.im/app/#/welcome

          I’m sure it is but looking at chat all day will basically reduce me to doing nothing. Maybe use the github issues thing to ask any questions. That way the same question doesn’t need to get answered multiple times.

      2. > eventually I go hold of some SDKs and things were a bit easier.

        Are those public? Can you share them somehow?

        Also, it would be cool if you could add “a pack of 5 SoC chips” as an item or addon on your campaign.

        1. >Are those public? Can you share them somehow? Or you mean the

          I have some other SDKs (userland bits) that are not public (as far as I know) and I’m not going to release as it’s not as clear cut as a kernel or uboot source tree where despite whatever silly “super confidential trespassers will be shot” banner they stick on it it’s clearly GPLv2. The userland bits aren’t so interesting anyhow. There are some headers with register locations and bit meanings but I’m cleaning up that info and collecting it anyhow.

          >https://github.com/longyanjun2020/SDK_pulbic

          This is the RTOS SDK for the Mercury 5 series of chips. It’s almost the same hardware as the MSC313E so it’s been very useful. Dumping the firmware out of an M5 device and disassembling it to find out how the USB phy calibration works is the only reason USB works on the breadbee. 😀

          Those chips are in widespread use in dashcams and drive recorders…

          >https://github.com/fifteenhex/linux-ssc325 ?

          This is the latest (kernel version) vendor kernel I have but it’s slightly incomplete. In that version they seem to have been super sneaky and hidden the camera and video encoding stuff in a secret RTOS running on the same core that the linux part talks to via the secure firmware calls. That one seems to be for the NPU enabled devices as it has the glue code for it in there.

          This one https://github.com/fifteenhex/linux_mstar_3.18 contains 3 different 3.x series kernels. These are the main sources of truth but reading them will drive you insane. They use device trees but then the drivers have hardcoded addresses wrapped in layers of macros all over the place.

          >Also, it would be cool if you could add “a pack of 5 SoC chips” as an item or addon on your campaign.

          YES!

  6. Looking at the relative size of components on this board, one cannot help thinking, that world clearly needs more compact Ethernet socket…

  7. Very cool project/product. I love stuff like this, I wish they featured more stuff like this around here even if it isn’t ready to ship rather than the rehashed press releases we usually get.

    More like this please!

      1. >Any idea of the size and pitch of the BGA?

        I have some of the MSC316D which is an older BGA part in this series and it’s .65mm pitch.

  8. Anyone knows of a chip running mainline, including:
    – mainline video in
    – mainline h264 encoding
    – mainline audio in (if need be through i2s or whatever)
    – cheap

    The closest I see is Allwinner A20. Old, but well supported and not EOL. This is what Luc Verhaegen is working on atm for FOSDEM, but it’s always good to make sure we didn’t miss any wonderful alternatives!

    1. >– mainline video in
      >– mainline h264 encoding

      Mainlining these two seems to take considerable effort which I think is why there are so many chips with basic support in mainline but very few with video encoder etc support.

      The comments for the register descriptions for the video encoder in these chips is in perfect English so it’s probably an off the shelf block from a big IP supplier that has a reasonable driver somewhere.

Leave a Reply

Your email address will not be published. Required fields are marked *

Boardcon Rockchip and Allwinner SoM and SBC products
Boardcon Rockchip and Allwinner SoM and SBC products