Home
Welcome to Chopin's homepage!
Work in progress...
Written by Freddie Chopin   
Friday, 29 August 2014 19:37

I was thinking about doing something like that for a long time... However usually intent is far away from something concrete, especially when you don't have that much free time in your hands. Finally I pulled myself together, so here is a little "teaser" of what I'm currently working on (among other things).

bool ThreadFunctionTypesTestCase::run_() const
{
  using scheduler::makeStaticThread;

  // thread with regular function
  {
    uint32_t sharedVariable {};
    constexpr uint32_t magicValue {0x394e3bae};

    auto regularFunctionThread = makeStaticThread<testThreadStackSize>(UINT8_MAX, regularFunction,
        std::ref(sharedVariable), magicValue);
    regularFunctionThread.start();
    regularFunctionThread.join();

    if (sharedVariable != magicValue)
      return false;
  }

  // thread with state-less functor
  {
    uint32_t sharedVariable {};
    constexpr uint32_t magicValue {0x2c2b7c30};

    auto functorThread = makeStaticThread<testThreadStackSize>(UINT8_MAX, Functor{}, std::ref(sharedVariable),
        magicValue);
    functorThread.start();
    functorThread.join();

    if (sharedVariable != magicValue)
      return false;
  }

  // thread with member function of object with state
  {
    constexpr uint32_t magicValue {0x33698f0a};
    Object object {magicValue};

    auto objectThread = makeStaticThread<testThreadStackSize>(UINT8_MAX, &Object::function, std::ref(object));
    objectThread.start();
    objectThread.join();

    if (object.getVariable() != magicValue)
      return false;
  }

  // thread with capturing lambda
  {
    uint32_t sharedVariable {};
    constexpr uint32_t magicValue {0x24331acb};

    auto capturingLambdaThread = makeStaticThread<testThreadStackSize>(UINT8_MAX,
        [&sharedVariable, magicValue]()
        {
          sharedVariable = magicValue;
        });
    capturingLambdaThread.start();
    capturingLambdaThread.join();

    if (sharedVariable != magicValue)
      return false;
  }

  return true;
}

Intriguing? Curious? Interesting? (;

It's a fragment of functional tests of an open-source project, which currently is in early alpha stage (first line of code was written just last month), but basic things - like the ones shown in the piece of code above - are working (on STM32F4) pretty well (; There is not much to say now, the only trace of this project is the github repository and this news... Just like in any open-source project the most important things are the users and the community, so any thoughts, ideas, remarks, opinions etc. can be posted here - in comments - or on github. If anyone's up for some coding, I'm open to cooperation. Work is ongoing, so "stay tuned" (;

Complete source file from which the fragment above was taken can be seen under this link.

Last Updated on Friday, 29 August 2014 19:57
 
OpenOCD version 0.8.0 released
Written by Freddie Chopin   
Monday, 28 April 2014 08:45
Previous version of OpenOCD was released almost exactly one year ago and package for Windows was downloaded almost 20000 times, so it's high time for a new version. The sources of version 0.8.0 were published yesterday and the package with Windows binaries is already available on my website (Download > Software > OpenOCD). The list of changes since the previous release is a bit long, so a link to official release announcement must be enough... One important information from my side - currently all interfaces using libftdi library require WinUSB driver (previously libusb-win32 was required) - this change is related to switching to the new version of library - libftdi1. The easiest way to install the driver is to use zadig software, and a short description of the process can be found in "drivers\libusb-1.0 drivers.txt" file, which is a part of the package.
Last Updated on Monday, 28 April 2014 09:00
 
New versions - OpenOCD 0.7.0 and bleeding-edge-toolchain-130503
Written by Freddie Chopin   
Sunday, 05 May 2013 16:31

Weather during May's first weekend was truly disappointing, fortunately new software versions are "blooming" (;

On Friday, 3rd of May 2013, ~3 months after previous release, I have published the most recent compilation of the bleeding-edge-toolchain, tagged as 130503. Of the most interesting additions, configure options for newlib are worth mentioning, some of them very fresh: --disable-newlib-fvwrite-in-streamio, --disable-newlib-fseek-optimization and --disable-newlib-wide-orient. These options reduce code size of programs using stdio.h's functions. Additionally - thanks to removal of --enable-newlib-register-fini - if the program does not use functions like atexit() then support for that functionality will not be linked. Due to transfer limits of this website all bleeding-edge-toolchain files were moved to sourceforge website, in Download > Software > bleeding-edge-toolchain you will find links to appropriate locations.

And today, on 5th of May 2013, OpenOCD 0.7.0 was released. Since release of previous 0.6.1 version almost 7 months have passed and the Windows package was downloaded over 11000 times. There are not a lot of new things, but worth mentioning are: support for Texas Instruments' ICDI debugger, improved MIPS handling, support for Cortex-R4 (ARMv7R) architecture, support for ChibiOS/RT debugging, support for LPC43xx and LPC18xx (for chips with internal flash and with external memory connected via SPIFI interface), EFM32, STM32W and i.MX6. Package with Windows binaries is - as usually - available in Download > Software > OpenOCD.

Download and enjoy!

Additionally - "thanks" to monotony caused by constant rainfall - I have decided to start a facebook page for my company DISTORTEC, so I invite you to take a look and "Like!" it > https://www.facebook.com/Distortec

UPDATE 11.05.2013:

There is another version of bleeding-edge-toolchain available, tagged as 130509. There were exactly two reasons for this compilation. First one - it turns out that there is no --disable-newlib-atexit-alloc option, it should be --disable-newlib-atexit-dynamic-alloc - thanks to this option functions related to atexit() don't allocate memory dynamically. Second reason is related to the project I'm currently doing, which requires printf() / scanf() specifiers introduced in C99, like all those strange %hhx and so on. This second change causes a slight increase in RAM requirements of these functions - about ~80 bytes - you know, nothing is for free (; .

Last Updated on Saturday, 11 May 2013 08:23
 
.info domain is back!
Written by Freddie Chopin   
Monday, 22 April 2013 19:12
After almost two months of problems www.freddiechopin.info domain is happily back! .pl domain will still remain active, with redirect to .info.
 
New example project - LPC4330
Written by Freddie Chopin   
Tuesday, 02 April 2013 16:38

In Download > ARM > Example there is another example project (template) - this time for NXP LPC4330, configured for LPC4330-Xplorer evaluation board. In the code, beside blinking the LED with editable speed, there are some basic system initialization routines - enabling of floating point coprocessor (FPU) and enabling PLL for max speed (204MHz). This example requires linaro toolchain (or bleeding-edge-toolchain), because CodeSourcery's toolchain lacks libraries that support floating point coprocessor. You' will also need development version of OpenOCD, any of 0.7.0-dev, as previous versions - including "stable" 0.6.1 - don't support SPIFI memory interface of this chip. It is also worth noting, that debugging this chip is troublesome - the best approach for now is to flash the chip directly with OpenOCD (separate shortcut provided), reset the chip "by hand", start "normal" OpenOCD session and start debugging with "debug" shortcut - the "load + debug" shortcut is included "pro forma", as currently it does not work correctly.

Whole project is also available in GIT repository.

Currently there are 7 examples / templates in the "collection" - 4 for NXP chips (LPC1114, LPC1769, LPC2103 and LPC4330) and 3 for ST chips (STM32F1, STM32F1 Connectivity Line and STM32F4) - download, use, comment and / or send patches (or templates for other chips, not available on website)!

Last Updated on Tuesday, 02 April 2013 16:59
 
«StartPrev12345678NextEnd»

Page 1 of 8