Posts

Showing posts with the label EK-TM4C123GXL

Coremark Platform - banchmark your MCU

Image
Recently we started a project based on Coremark. We name it Coremark Platform because the idea is to add support to many different MCUs so everybody can check how the benchmark is done and can easily port their MCU to see how will score.

Tiva TM4C123GH6PM scores 101 points on CoreMark

Image
Lately, on STM page I have found out they put Coremark scores on brochures for the microcontrollers.  I was wondering what competitors scores, so I couldn't find anything for Texas Instrument. On https://www.eembc.org/ I have found out there is a source code of Caremark which can be ported on any platform, so I decided to port it on Tiva TM4C123GH6PM and test it. Here are the results: 2K performance run parameters for coremark. CoreMark Size    : 666 Total ticks      : 19775 Total time (secs): 19.774999 Iterations/Sec   : 101.1378 Iterations       : 2000 Compiler version : GCC7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204] Compiler flags   : Memory location  : STACK seedcrc          : 0xe9f5 [0]crclist       : 0xe714 [0]crcmatrix     : 0x1fd7 [0]crcstate      : 0x8e3a [0]cr...

ARM sinus lookup tables 5x faster than math.h - TM4C123GXL Cortex M4F

Image
Lately, I was working with IIR filter so in CMSIS repo I saw look-up table with sinus value. I was wondering how much faster it works then math.h sinus function. The name of the function which uses a lookup table is arm_sin_f32() which is part of  arm_math.h Lets first compare results calculated with the lookup table and math.h sin function. Result2 are from the lookup table (arm_sin_f32() -> arm_math.h) and result1 are from sinus function (sin() -> math.h). From results is seen that after decimal point 4-5 digits are similar so take care with that.  I have done an iteration of 100 000 calculation and I was measuring the time needed for math.h sin and got 9726 [ms], and for arm_math.h 2006 [ms] which is almost 5x time faster.  In the photo below I added sinus wave for both calculations. Blue is result1 and red is result2. You can see they overlap.  You can check the code on the link . 

Running Nuttx RTOS on EK-TM4C123GXL

Image
This is the short tutorial on how to build and flash Nuttx, the real-time operating system on TM4C123G LaunchPad on fresh installed Ubuntu 16.04 LTS. More about Nuttx for TM4C123G LaunchPad: https://bitbucket.org/nuttx/nuttx/src/42a0796615909b301273ee30fd5af907f4253347/configs/tm4c123g-launchpad/?at=master Building Nuttx In terminal run this commands: mkdir nuttxdir cd nuttxdir git clone https://bitbucket.org/nuttx/nuttx git clone https://bitbucket.org/nuttx/apps git clone https://bitbucket.org/nuttx/tools sudo apt-get install gperf flex bison libncurses5-dev cd tools/kconfig-frontends/ ./configure --enable-mconf make sudo make install sudo ldconfig cd ../.. Without libncurses5-dev you will have the problem with kconfig-mconf, so don't miss to install it.  cd nuttx/tools ./configure.sh tm4c123g-launchpad/nsh cd .. make menuconfig Inside menu config, you need select System Type -> Toolchain Selection -> Generic GNU EAB...

Debugging EK-TM4C123GXL with Visual Studio Code on Linux

Image
If you have TM4C123G LaunchPad Evaluation Kit and you like Visual Studio Code here is how to setup debugging on this board. This is the tutorial how to do that on clean Ubuntu 16.04 LTS. ARM GCC Compiler Setup Download the latest GCC cross compiler for the ARM from here:  https://launchpad.net/gcc-arm-embedded/+download In the time of writing this text, the last one is    gcc-arm-none-eabi-5_4-2016q3-20160926-linux.tar.bz2 Run this commands in Linux console. wget https://launchpad.net/gcc-arm-embedded/5.0/5-2016-q3-update/+download/gcc-arm-none-eabi-5_4-2016q3-20160926-linux.tar.bz2 tar -jxf gcc-arm-none-eabi-5_4-2016q3-20160926-linux.tar.bz2 rm gcc-arm-none-eabi-5_4-2016q3-20160926-linux.tar.bz2 exportline="export PATH=$HOME/gcc-arm-none-eabi-5_4-2016q3/bin:\$PATH" echo $exportline >> ~/.profile source ~/.profile sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install libc6:i386 lib32ncurses5 Without i386 architecture ...