Computer Vision, Artificial Intelligence, Machine Learning, etc.. are all terms we hear frequently those days. JeVois-A33 smart machine vision camera powered by Allwinner A33 quad core processor was launched last year on Indiegogo to bring such capabilities in a low power small form factor devices for example to use in robotics project. The company improved the software since the launch of the project, and has now sent me their tiny Linux camera developer kit for review, and I’ve already checked out the hardware and accessories in the first post. I’ve now had time to test the camera, and I’ll explained how to set it up, test some of the key features via the provided guided tour, and show how it’s possible to customize the camera to your needs with one example. Getting Started with JeVois-A33 In theory, you could just get started by inserting the micro SD card provided with […]
Aspencore 2017 Embedded Markets Study – Programming Languages, Operating Systems, MCU Vendors, and More
Aspencore media group asked readers of their EE Times and Embedded.com websites to fill out an online survey about their embedded system projects. They got 1,234 respondents mostly from North America (56.3%), followed by Europe (25.2%), and Asia (10.6%). This resulted in a 102-page market study which you can download here. I’ve extracted a few slides to have a look at some of the trends. C language is still the most used language in embedded systems, but other languages like C++, Python and even assembly language are gaining traction. Operating system is more spread with Linux being the most used via Embedded Linux distributions, Debian, and Ubuntu. FreeRTOS comes in second place, while Android registers fourth with 13%. Git has finally supplanted Subversion in 2017, with all other version control software losing ground. Switching to some hardware slides, 44% used a development board to start their embedded design with ST […]
Top Programming Languages & Operating Systems for the Internet of Things
The Eclipse foundation has recently done its IoT Developer Survey answered by 713 developers, where they asked IoT programming languages, cloud platforms, IoT operating systems, messaging protocols (MQTT, HTTP), IoT hardware architectures and more. The results have now been published. So let’s have a look at some of the slides, especially with regards to programming languages and operating systems bearing in mind that IoT is a general terms that may apply to sensors, gateways and the cloud, so the survey correctly separated languages for different segments of the IoT ecosystem. C and C++ are still the preferred languages for constrained devices, and developers are normally using more than one language as the total is well over 100%. IoT gateways are more powerful and resourceful (memory/storage) hardware, so it’s no surprise higher level languages like Java and Python join C and C++, with Java being the most used language with 40.8% […]
How to Write ESP8266 Firmware from Scratch (using ESP Bare Metal SDK and C Language)
CNXSoft: This is a guest post by Alexander Alashkin, software engineer in Cesanta, working on Mongoose Embedded Web Server. Espressif’s ESP8266 had quite an evolution. Some may even call it controversial. It all started with ESP8266 being a WiFi module with a basic UART interface. But later it became clear that it’s powerful enough for embedded system. It’s essentially a module that can be used for running full-fledged applications. Espressif realized this as well and released an SDK. As first versions go, it was full of bugs but since has become significantly better. Another SDK was released which offered FreeRTOS ported to ESP. Here, I want to talk about the non-OS version. Of course, there are third-party firmwares which offer support for script language to simplify development (just Google for these), but ESP8266 is still a microchip (emphasis on MICRO) and using script language might be overkill. So what we […]
Top 10 Programming Languages in 2016 for Embedded Software Development
IEEE Spectrum has published a list of the top programming languages in 2016 for Web, Mobile, Enterprise, and Embedded sectors with rankings created by weighting and combining 12 metrics from 10 sources. So I thought it would be fun to have a look at the top 10 of languages used for embedded software, and the results are: As expected, C and C++ are at the top, but I’m quite surprised that “Arduino” is now considered a programming language, as it is simply based on C/C++. When I worked as an embedded software engineer a few years ago, I personally used C, and Assembly, and to a lesser extend C++ and VHDL. I only recently started to play with Arduino code, and while I’ve heard of most other languages in the list, it’s the first time I’ve ever seen Ladder Logic, probably because it’s designed to program PLCs in industrial control […]
The Eclipse Foundation Releases Open Source Smart Home & IoT Gateway Frameworks, MQTT & oneM2M Implementations
The Eclipse Internet of Things (IoT) Working Group has released – or soon will be releasing – four open source projects for the Internet of Things with Eclipse SmartHome 0.8 framework, Eclipse Kura 2.0 IoT gateway framework, Eclipse Paho 1.2 MQTT & MQTT-SN clients, and Eclipse OM2M 1.0 implementation of oneM2M standard. Eclipse SmartHome 0.8 Eclipse SmartHome is a framework for smart home solutions that runs on embedded devices, including Raspberry Pi, BeagleBone Black or Intel Edison development boards. The latest SmartHome 0.8 release includes a new REST API and corresponding “Paper UI” administration interface, support for new devices including Sonos speakers, LIFX bulbs, Belkin WeMo devices, digitalSTROM systems, EnOcean devices (via a new OSGi EnOcean Base Driver) and others, as well as a new rule engine supporting templates for beginners, JavaScript for automation rules and graphical rule editors. You can find more details on Eclipse SmartHome page, and/or download SmartHome 0.8, […]
ELLO 2M is a DIY Computer with a Keyboard, a 7″ Touchscreen Display and a Prototyping Area (Crowdfunding)
The traditional way to play with electronics is to get a board (e.g. Arduino), a breadboard to wire components & sensors to the board, and a computer for programming. ELLO 2M combines all that into a single piece of hardware with a 7″ touchscreen display, a Microchip PIC32 micro-controller board, a solderless prototyping area made of PGA sockets, and a keyboard. ELLO 2M hardware specifications: MCU – Microchip PIC32MX470 32-bit micro-controller @ 120 MHz with 128kB RAM (512kB RAM in the ELLO 2M “hacker” versions) Extra System Memory – Optional on-board serial non-volatile data RAM Storage – 3x micro-SD cards (one permanently built-in and two for removable storage); internal serial FRAM Display – 7″ LCD touch-screen panel with 800×480 pixel resolution Audio – Small speaker and buzzer Keyboard – Replaceable QWERTY keyboard Connectivity – 2.4GHz RF communication module with simple communication protocol Expansion – Expansion receptacle, electronic prototyping space with […]
GNU Complexity Command Line Tool Measures Complexity of C Code
GNU complexity is a command line tool that computes a complexity measure of C source code, similar to pmccabe, but with a different method of calculating results with short functions scoring lower than pmccabe and highly nested functionality can score considerably higher. It can be useful to locate suspicious areas in unfamiliar code, get an idea of the efforts required to either understand the code or test it, or self-assess your own code. Bruce Korb, the maintainer, has just released version 1.5 with some bug fixes, so I’ve given it a quick try. We’ll need to get the code, build and install it first:
1 2 3 4 5 6 |
wget ftp://ftp.gnu.org/gnu/complexity/complexity-1.5.tar.gz tar xvf complexity-1.5.tar.gz cd complexity-1.5 ./configure make -j8 sudo make install |
The user’s manual provides some insights and an example, which I’ve used against a directory in Linux source code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
cd ~/edev/linux/arch/arm64/kernel complexity --histogram --score --thresh=3 `ls *.c` procedure fpsimd_pm_init in fpsimd.c ended before final close bracket procedure fpsimd_hotplug_init in fpsimd.c ended before final close bracket Complexity Scores Score | ln-ct | nc-lns| file-name(line): proc-name 3 28 17 perf_callchain.c(111): perf_callchain_user 3 20 18 insn.c(337): aarch64_insn_decode_immediate 3 21 19 io.c(27): __memcpy_fromio 3 21 19 io.c(56): __memcpy_toio 3 30 19 cpufeature.c(860): verify_local_cpu_capabilities 3 21 20 module.c(74): reloc_data 3 24 20 setup.c(199): request_standard_resources 3 27 20 alternative.c(89): __apply_alternatives 3 29 20 cpu_ops.c(53): cpu_read_enable_method 3 29 24 insn.c(362): aarch64_insn_encode_immediate 3 31 24 ptrace.c(76): ptrace_hbptriggered 3 54 24 kgdb.c(159): kgdb_arch_handle_exception 3 28 25 armv8_deprecated.c(145): update_insn_emulation_mode 3 32 25 debug-monitors.c(334): aarch32_break_handler 3 35 26 smp.c(413): acpi_map_gic_cpu_interface 3 42 26 process.c(249): copy_thread 3 58 27 perf_event.c(572): armv8pmu_handle_irq 3 32 28 hw_breakpoint.c(544): toggle_bp_registers 3 34 28 insn.c(1019): aarch64_insn_gen_data3 3 34 29 insn.c(519): aarch64_insn_gen_comp_branch_imm 3 56 29 setup.c(121): smp_build_mpidr_hash 3 35 30 insn.c(397): aarch64_insn_encode_register 3 42 31 signal.c(167): setup_sigframe 3 37 33 hw_breakpoint.c(349): arch_bp_generic_fields 3 49 34 setup.c(232): relocate_initrd 3 41 35 insn.c(708): aarch64_insn_gen_add_sub_imm 3 63 38 setup.c(292): setup_arch 3 109 57 cpufeature.c(469): update_cpu_features 4 46 26 smp.c(477): of_parse_and_init_cpus 4 38 31 traps.c(335): call_undef_hook 4 36 32 insn.c(924): aarch64_insn_gen_data1 4 49 33 armv8_deprecated.c(464): cp15barrier_handler 4 71 34 stacktrace.c(41): unwind_frame 4 42 35 ptrace.c(437): hw_break_set 4 42 37 insn.c(968): aarch64_insn_gen_data2 4 49 37 smp.c(708): handle_IPI 4 58 37 hw_breakpoint.c(231): hw_breakpoint_control 4 47 40 insn.c(757): aarch64_insn_gen_bitfield 4 54 44 ptrace.c(376): hw_break_get 4 60 44 armv8_deprecated.c(378): swp_handler 5 28 27 hw_breakpoint.c(198): hw_breakpoint_slot_setup 5 45 35 ptrace.c(672): compat_gpr_get 5 50 36 hw_breakpoint.c(764): reinstall_suspended_bps 5 59 37 hw_breakpoint.c(476): arch_validate_hwbkpt_settings 5 48 42 insn.c(811): aarch64_insn_gen_movewide 5 49 42 insn.c(868): aarch64_insn_gen_add_sub_shifted_reg 5 60 44 psci.c(36): cpu_psci_cpu_init_idle 5 49 46 insn.c(277): aarch64_get_imm_shift_mask 5 95 89 asm-offsets.c(34): main 6 34 32 cpufeature.c(792): __raw_read_system_reg 6 67 37 signal.c(332): do_signal 6 43 39 topology.c(50): parse_core 6 54 41 ptrace.c(724): compat_gpr_set 6 74 44 traps.c(147): dump_backtrace 6 55 49 insn.c(646): aarch64_insn_gen_load_store_pair 6 76 49 hw_breakpoint.c(393): arch_build_bp_info 6 71 52 hw_breakpoint.c(584): breakpoint_handler 6 61 54 insn.c(1062): aarch64_insn_gen_logical_shifted_reg 6 73 59 ptrace.c(1120): compat_arch_ptrace 8 50 30 cpuinfo.c(102): c_show 8 64 50 topology.c(97): parse_cluster 8 97 65 hw_breakpoint.c(660): watchpoint_handler 9 44 32 traps.c(59): dump_mem 11 71 55 signal32.c(129): copy_siginfo_to_user32 31 198 172 module.c(184): apply_relocate_add Complexity Histogram Score-Range Lin-Ct 0-9 2206 ************************************************************ 10-19 55 * 20-29 0 30-39 172 ***** Scored procedure ct: 65 Non-comment line ct: 2433 Average line score: 7 25%-ile score: 3 (75% in higher score procs) 50%-ile score: 5 (half in higher score procs) 75%-ile score: 6 (25% in higher score procs) Highest score: 31 (apply_relocate_add() in module.c) |
The resulting table shows six information per line: the computed score, the number of lines between the opening and closing curly braces (ln-ct), the number […]