Ceedling Unit Testing With ATSAME54 Testing by neudeep - May 17, 2019May 20, 20190 This post is continuation of previous post on how to mock local variable in ceedling, please check out previous post before continuing with this article. Another issue is having to add all the microchip files. When CMock gets a hold of the header file it looks at all the functions defined there and generates several mock functions for each. In one program, we are dealing with 4 pins of microcontroller. The pin numbers and its functions are defined in file 'atmel_start_pins.h' which is included in our project. But inside this file there are definitions for all the pins and 'hal.gpio.h' file is included. Inside 'hal.gpio.h' file, another files are included. The original atmel_start_pins.h file is like below, We need
How To Mock Local Variable In Ceedling embedded by neudeep - May 17, 2019August 30, 20210 In embedded system product development there are quite number of tools and framework for unit testing the C code. In this blog post I will explain about how to mock local variable in ceedling for unit testing. Ceedling is one of the widely used open source framework for your test driven product development (TDD) in embedded systems. What is Ceedling 'Ceedling' is open source framework used in unit testing, in our project which involves embedded system development we are using 'ceedling' framework. Ceedling works together with Unity and CMock. Both are are open source tools for testing C code. Ceedling has feature of automatic generation of mock. Read more about ceedling features in our previous blog post. Unit Testing Tools Unit
EmbSysRegView Alternative Plugin For Eclipse embedded by blog_1buq8n - April 11, 2019April 13, 20190 If you are looking for alternate option for EmbSysRegView (embedded system register view) plugin or wondering 'How to Add Register Details View in Eclipse" this post describes simple trick to it. The standard Eclipse registers view shows only the core registers, which is not enough in embedded system development. So, EmbSysRegView – is an open source solution for 8, 16 and 32 bit microcontroller to display special function registers (SFR) while debugging. EmbSysRegView is a good plugin which supports GCC toolchain including GDB with Eclipse for emebedded system development, but it is not maintained and lacks support for new controllers. One can always refer to previous post we have seen how to add register details view in Eclipse for
EmbSysRegView In Eclipse For SAME54 On Ubuntu embedded by blog_1buq8n - April 4, 2019April 11, 20191 After successfully able to debug using OpenOCD and Eclipse, Now it is time to explore more. To start with, lets install EmbSysRegView plugin, This plugin gives similar functionality to the 'I/O view' in Atmel Studio 7. It displays special functions registers (SFR), peripheral registers values and memory values. This needed in embedded system development. Installation Bad news is, You can not install the EmbSysRegView plugin from the eclipse marketplace since eclipse marketplace is referring to old sourceforge download URL. Installation from Marketplace fails: An error occurred while collecting items to be installed session context was:(profile=_Applications_Eclipse.app_Contents_Eclipse, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=). Artifact not found: http://embsysregview.sourceforge.net/update/plugins/org.eclipse.cdt.embsysregview_0.2.6.jar. The new link to download is from sourceforge latest download, But it does not download full files and this
Debugging in Eclipse Using OpenOCD on Ubuntu embedded by blog_1buq8n - April 3, 2019April 11, 20192 This is second part of ongoing tutorial on setting up GCC + Eclipse + OpenOCD environment for use with the SAME54 Xplained pro board on latest Ubuntu system. In order to be able to follow this blog entry you must already have the gcc-arm toolchain and openOCD configured When we talk about debugging it is important to know that the actual "debugger" or emulation hardware is "on chip" and is called the "on chip debug" (OCD) hardware. While there are other methods to debug your embedded code using DDD, Kgdb, & Gdb on Ubuntu in this post will see debugging using Eclipse. Prerequisite - Download and install the latest version of Eclipse (open-source integrated development environment). Compile and install openOCD
ARM Cortex-M4 HOWTO Debug Under Ubuntu embedded by blog_1buq8n - April 1, 2019May 20, 20190 With SAME54 board and using OpenOCD will debug the LED Flasher example. This post assumes that basic setup is ready using GNU-ARM Embedded Tool chain and OpenOCD. Basic gdb with OpenOCD To Begin with connect the SAME54 explained pro board and start the OpenOCD server using telnet telnet localhost 444>reset halt Then it is time for gdb to use GDB via openocd there are couple of options like, gdb, ddd, insight and kdgb. Will start with gbd $arm-none-eabi-gdb --eval-command="target remote localhost:3333" AtmelStart.elf This will start gdb with remote debugging and you can see following message Type "apropos word" to search for commands related to "word"… Reading symbols from AtmelStart.elf… Remote debugging using localhost:3333 main () at ../led_switcher_main.c:55 55
Setup GCC ARM Tool Chain For SAM E54 Xplained Pro embedded by blog_1buq8n - March 30, 2019March 30, 20190 steps for setting up a free and fully functional GCC + Eclipse + OpenOCD GDBServer environments for use with the SAME54 Xplained Pro board.
ATSAME54 Config File Using Openocd embedded by blog_1buq8n - March 18, 2019April 11, 20190 Sometimes solutions are very simple. Openocd (Open On-Chip Debugger) is used on ubuntu for debugging and flashing programs to your target board. We are using SAM E54 Xplained Pro board. The problem started when we could not locate openocd config file for ATSAME54. After searching on google for a while we came to know that atsame5x.cfg we have to apply patch from openocd to get this working. As per openocd site they mentioned that support for ARM M4 series is added for microchip SAM D/E series controllers. We have downloaded patch updated openocd and after running it using following command, could not connect to board and got same error. $ openocd -f tcl/board/microchip_same54_xplained_pro.cfg Open On-Chip Debugger 0.10.0+dev-00409-g1ae106de (2019-03-18-12:24) Licensed under GNU
Software Unit Testing With Ceedling Testing by neudeep - March 12, 2019August 29, 20210 Ceedling is one of the best test automation framework for doing unit testing of your embedded C software system code. Unit testing is code that calls some other code to check if it performing as expected. Ceedling is specifically designed for running unit tests for C language code. Ceedling has feature of automatic generation of mock. Unity is a unit test framework.CMock creates the fake versions of other modules. Using these fake versions we can verify whether our module is working correctly or not.Ceedling include unit test framework(Unity) and Mocking framework(CMock).It requires Ruby to run as Ceedling build system uses rake files. Ceedling comes with a command line tool that can be used to generate the project. Check out details on how