I expect the Arduino to be easier, was in a hurry to see some pwm output, so I started with it. It shows all results of size by Module, by file, by section. I just had to drag and drop the map file, it complies with the "intuitive" qualification, and also with the "flexibility" as it works with command lines. Solution Start by having a look inside the build result, first a size summary arm-none-eabi-size -B -d -t. When the Flash size does not fit the build size any more, well, the whole concept of the dev kits selection breaks down and we have to opt to a more expensive device, in the case of the Bluepill, that can really hurt. Problems we've seen in the main details of this project different build size results for the same source code depending on the build environment. Every 10 ms the rasp polls the joystick and if there is an update, sends a new servo command. Testing the Servo UART protocol Below we can see the binary command going out of the Raspberry pi, the anylzer is beeing smart here changing the values randomly to characters or ascii code depending on his wish. Note that the PWM is 16 bits and the Joystick refresh rate is 10 ms for a 20 ms servo period, so the control cannot be more fluent. Note that here we're comparing the same source code with two compilers.
The OS size overhead is also of course significant, so I'm not sure if it's easy to use mBed libraries without the OS to reduce the footprint. It is non sense to compare an OS running system to a bare metal one, this is nevertheless what you get out of the box, so nice to note that the mBed is smarter lower power on delays and in this case the Arduino simpler with faster startup.
Clean and easy, but in case someone stick with mbed and wants to use mbed libraries, what's the point of learning how to use a new complete environment? Two twin BluePills are shown below for a power measure where each has a 22 Ohm resistor in series and fed with 6V for an expected drop of around 1V.Īfter failing to use these libraries that are obviously compatible with the chip but platformIO still does not know that, I realised that adding a custom device or board require full understanding of this new yet another scons based build toolchain. Here we go through a list of Hello world examples and then stick to the PS4 Joystick used by the raspberry pi to control a servo motor.
There we would see how to manage libraries, add blue pill support, fork and patch the mbed-os and solve the flash size problem by including the nano library flag. To make the experience fit your profile, pick a username and tell us what interests you.