Google Code shutting down

google_code

Seems the popularity of GitHub disrupt all similar services, SourceForge is on resuscitation for years and although not closed it’s barely used just for legacy projects. Google Code is in same situation, so Google decided to cut the agony and close it.

They stopped to accept new projects and the site functionality will be keep same till August 2015 then it will be put in read only mode and early in 2016 completely shut down. There is new tool which allow you to export your project to GutHub https://code.google.com/export-to-github

Weekend Programming Challenge – Week #68 Text Formatting

non-formatedformatted

Problem:

Input text and width, then format the text in this width to be with no spaces at the end of the line. You can use this text to test your code

The rules:

You can code the solution in any programming language during the weekend and have to submit it to info@olimex.com latest on Sunday November 9th.

On Monday we will upload the solutions on GitHub https://github.com/OLIMEX/WPC

You can play with your real name or with nick if you want to be anonymous, we will not disclosure your personal info if you do not want to.

PIC32MX220D Code Generator Project

PIC32

Few days ago Antonio Leite sent me this e-mail:

Dear Mr. Tsvetan Usunov

A few weeks ago I purchased a board PIC32-Pinguino-MX220 and started working on it.

As I was new to PICs 32 microcontrollers, I started searching code and samples on the internet, besides reading the user manual and the library pdf to have the minimum code to make a led to blink and understand how this pic32 family works.

I started thinking that lots of people must overtake the same boring tasks before having the board fully functional.

Then I started writing an application that generates code automatically for me and my colleagues. The application was a success and everybody started saying that Olimex should be interested in this application.

I am sending a pdf that I would like Mr Usunov to have a view and see if this kind of application has some interest for Olimex.

I am attaching a project so that it can be open on the MPLABX environment. The files .c and .h generated by the application are ADCDrv, CoreTimerDrv, GPIODrv, PWMDrv, UARTDrv and configurator.xml.

To connect the board to the computer I used a USB-Serial-Cable-F

Best regards

Project files are available here.

Project description is here.

On this video you can see how it works:

 

 

Weekend Programming Challenge – Week #23 – Evil code

Image

Problem:

Invent something small and evil which to be almost invisible and to cause lot of troubles to catch like:

#define struct union

#define double float

#define floor ceil

#define true (__LINE__&42) !=42

#define private public

The rules:

You can code the solution in any programming language during the weekend and have to submit it to info@olimex.com latest on Sunday September 8st.

On Monday we will upload the solutions on GitHub https://github.com/OLIMEX/WPC

You can play with your real name or with nick if you want to be anonymous, we will not disclosure your personal info if you do not want to.

Do we really need faster computers to write more bloated software?

Image

It’s crazy how powerful the hardware becomes nowadays, every three to six months the productivity doubles at least in the ARM world.

Now we have 4-core RK3188 Cortex-A9 running at 1.8Ghz, After three months there will be an 8-core new processor, then a 16-core etc.

I start asking myself do we really need such powerful processors? Even A10 a single core Cortex-A8 at 1Ghz is capable of decoding and playing video. Then what the hell you need more? Can you watch 16 videos at same time?

The only consequence  of the powerful hardware I see is that programmers write more and more bloated software on it. They become lazier, because the hardware is fast they do not try to learn algorithms nor to optimize their code – why use quick sort when my computer can sort the array for a microsecond using bubble sort?

This is crazy!

Back in 1980s Borland Turbo Pascal 3.0 was on one 5″ disk and in 39KB. There was minimalistic IDE with editor, Pascal compiler, linker and run-time library, and it was compiling and linking something like 10 000 Pascal lines per second on a humble 386 Machine on 25Mhz!

A few weeks ago we installed Code Composer Studio on a 3Ghz Machine with 4GB of RAM and wrote a simple EMPTY “hello world” for AM3352 just to check if it works with our TMS320-XDS100-V3 JTAG as bare metal programming.

After scratching the HDD for nearly 15 minutes this 1-liner code was successfully compiled!

We couldn’t believe our eyes! The programmer who did this bloatware should be publicly lynched, this is simply ridiculous! I couldn’t imagine ANYONE with common sense of ever considering working with such a compiler, so I called a friend of mine who I know uses CCS because he has no other choice.

He told me that this is absolutely correct and that he and his collegues who work with CCS have developed very bad habits during their work with it. Working with CCS makes him smoke at least two packs of cigarettes per day!

He says that usually their development process is like this: they hit the compile button then go out for coffee or to smoke while the code is being compiled, after 10-20 minutes they go back, run the code and find bugs, then they try to remember what they had changed before they hit the compile button, which, in many cases, they’ve already forgotten 🙂

Here is another blog article for the 50 bytes of source code which takes 4GB to compile.

What the hell is going on with the programming industry?

Estonia publish on GitHub their e-voting source code

Image

Estonia created the world’s first nationwide Internet-based voting system and use it since 2005. All ID cards in Estonia also bear personal electronic signature which allow Estonian citizens to use it to access all government and electronic services securely online.

Last Friday the source code of the e-voting system was released for public on GitHub http://news.err.ee/politics/0233b688-b116-44c3-98ca-89a4057acad8

This is very nice example of transparency which many other countries should follow.

photo used from http://arstechnica.com/tech-policy/2013/07/estonia-publishes-its-e-voting-source-code-on-github/

RK3188 USD 12 Quad Core Cortex-A9 running at 1.8Ghz

Image

RK3188 is Quad Core Cortex-A9 processor running at up to 1.8 GHz produced on 28 nm process, with Quad core Mali 400 @ 533 Mhz.

This SoC  was released just few months ago but took the tablet and Android devices market by storm like this was done one year ago by A10 from Allwinner.

The competition between these two companies Rockchip and Allwinner is with long traditions. The result is incredible productivity combined with rock bottom low prices as the stake is million devices Android market.

RK3188 is build on 28 nm process which allow it to work reliable up to 1.6-1.8Ghz although overclocing up to 1.92Ghz with proper cooling is reported here: http://liliputing.com/2013/06/rockchip-rk3188-chip-overclocked-to-run-at-1-92-ghz.html

If you look at ebay now there are lot of RK3188 devices at very competitive prices.

With so many RK3188 devices it’s just matter of time Linux community around Rockchip to be formed same as the Linux-Sunxi community around Allwinner chips.

There are already several blog posts for Ubuntu running on RK3188 http://liliputing.com/2013/06/ubuntu-up-and-running-on-android-min-pcs-with-rk3188-chips.html

and Linux sources http://liliputing.com/2013/06/linux-source-code-for-rockchip-rk3188-devices-now-available.html some very basic functionality also hit mainline.

More links: http://www.omegamoon.com/blog/ and https://github.com/aloksinha2001

IRC channel at freenode #linux-rockchip is set where RK3188 Linux developers chat.

Unfortunately there is almost no info for RK3188 on internet.

The only RK3188 brief is available which I put on Github https://github.com/OLIMEX/OLINUXINO/tree/master/HARDWARE/RK3188-PDFs .

Rockchip seems much more closed than Allwinner. While Allwinner already learned that Open Source community just help them to sell more Chips by providing Linux support for free, Rockchip is still one year behind and do not see any benefits from Linux and Open Source.

If you look at their web site there are no e-mails (actually there is one e-mail which they do not answer at all) and just few phones for distributors in different Chinese sites.

As the chip is new, it still have not hit the stocking distributors in Shenzhen too.  So how you buy chips?

Not easy! I asked Chinese friend to call these phones and ask for sales person – he did but from Rockchip ask him for the Chinese name of the sales person he want to contact to connect him?!? hmmmmm, typical Chicken-Egg problem – to buy chips you have to contact sales person, but you cant contact him if you do not know him 🙂

Tom Cubie (aka hipboi) who made Cubieboard wrote on irc channel that  visited Rockchip and learned that Rockchip targets to sell 50 millions RK3188 chips this year, no wonder they are not interested in selling chips to some smallish Western customers who will just bother them with GPL sources and endless technical support questions.

Also interesting info which Tom shared is that the volume price of RK3188 is USD $12.00 ( or $3 per 1.8GHz Cortex-A9 core !) now this is the reason for the so low cost of RK3188 devices. Sure this price will be not for mortal non-Chinese who buy less 100 Kpcs, but whatever margin above it have in the sales chain it will be still much more below th $40 price for the 1Ghz 4 core iMX6 for instance.

SO RK3188 is really interesting Chip and if we can obtain more info we would be definitely interested to release OLinuXino with it.

After some days bothering Rockchip on the phone and presening Olimex we seems to break the ice.

The key was to show them the A10, A10S, A13, A20 boards we did already for Allwinner.

Rockchip sent us NDA to complete and now we are waiting their HQ to approve us and eventually to give us access to more info so we can complete board with RK3188.

Crossing fingers this to happen soon 😉

Em::Blocks free C/C++ IDE based on code::blocks framework

Image

Em::Blocks is free C/C++ IDE based on code::blocks framework targeting embedded applications.

Support for ARM, PIC, AVR, MSP430 is included with GCC compilers and GDB debugging.

The most important feature we like is the Project Wizzard which allow you to start your project with templates which cover the most popular ARM processors from ST, NXP, EM etc.

And according to this forum messages http://www.emblocks.org/forum/viewtopic.php?f=19&t=70 there is no problem to debug with OpenOCD GDB server.

You can see from this video how easy is to setup project for STM32F4 with the Project Wizzard: http://www.youtube.com/watch?v=coHPJylnzC8

So with ARM-USB-TINY-H and Em::Blocks you are ready to go for embedded ARM work.

MOD-LTR501ALS demo for Arduino, OLinuXino Linux and OLinuXino Android

Image

This video present small demos we made for Arduino and OLinuXino:

http://www.youtube.com/watch?v=VDwQkD9FkQU

The Arduino code from the video: https://github.com/OLIMEX/DUINO/tree/master/AVR/MOD-LTR501ALS

The OLinuXino Linux code: https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/A13/A13-WIFI-LINUX-MOD-LTR501ALS

The OLinuXino Android code from the video: https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/A13/A13-WIFI-ANDROID-MOD-LTR501ALS