by IshKebab · 10y ago · 0 comments
Btw the best way to program these (if you want to do it the 'real' way) is using Yotta.
http://yottadocs.mbed.com/tutorial/tutorial.html
You can get started really quickly:
1. Install yotta
2. Start->Run Yotta
3. mkdir mything
4. cd mything
5. yt init
6. Paste some code in source/main.cpp
7. yt target bbc-microbit-gcc
8. yt install ble
9. yt build
Then find a file called mything-combined.hex in the build directory and copy it to the mBed USB drive.
It's all very command-line based and Yotta is Python/CMake-based which is quite slow and very IDE-unfriendly. But it does work well.
1. sudo apt-get install gcc-arm-none-eabi
2. make
Instead, we have this extreme tool-bloat where a tiny tiny executable is produced using python, python-setup, cmake, libffi, libssl, clang, pip and finally yotta in addition to GCC and binutils (which is really all you should need).Can someone please explain to me this new trend of in-house tools and tool-bloat?
How do you install the BLE dependencies?
How do you use apt-get on Windows?
I agree it could be easier and also agree that Python and CMake are the wrong tools for the job, but frankly apt and make would be worse.
At least they seem to have designed the module description system fairly nicely so it could potentially be rewritten with a better architecture in future.
Also, apt-get works just fine on Windows 10 nowadays :)
edit: For the record, there is nothing wrong with a new tool system. But adding layers of layers of complexity and dependencies to something simple just because you couldn't care to learn to do things the standard way only creates problems for you and your users.
Make > Yotta > Cmake > Ninja > GCC
I've been through this fun, and it's just not worth the fun.
On a related note, The micropython stack for the microbit is currently:
Bare metal > mBed HAL > microbit-dal > micropython_hal > micropython
so three hardware abstraction layers! and this is on a device with only 16k RAM. Now Damien did a great job on getting micropython ported so quickly, but there /must/ be a better long-term solution to the mBed/yotta approach.
I've seen a few reports online* mentioning this was specifically removed. Given the target market (11 year olds, many of whom are likely to have younger siblings) exposed coin cell batteries are a potential risk the BBC had to consider and chose to avoid. I do wonder what the cost of a basic plastic case would be.
* http://www.theregister.co.uk/2015/07/07/bbc_microbit_final_s...