Category: BrainDamage

CUDA compilation error

mkdir -p ./bin 
/usr/bin/nvcc -I/usr/include -O2 -Xcompiler -fPIC -o bin/out/ProgramCU.o src/pba/ProgramCU.cu -c
src/pba/ProgramCU.cu(131): warning: statement is unreachable

src/pba/ProgramCU.cu(131): warning: statement is unreachable

/usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’:
/usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope
   return (char *) memcpy (__dest, __src, __n) + __n;
                                          ^
src/pba/ProgramCU.cu: In member function ‘void CuTexImage::BindTexture(textureReference&)’:
src/pba/ProgramCU.cu:41:80: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
     if(sz > MAX_TEXSIZE) fprintf(stderr, "cudaBindTexture: %d > %d\n", sz , MAX_TEXSIZE); 
                                                                                ^
src/pba/ProgramCU.cu: In function ‘bool ProgramCU::ShuffleCameraJacobian(CuTexImage&, CuTexImage&, CuTexImage&)’:
src/pba/ProgramCU.cu:2199:76: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
         fprintf(stderr, "datasize way too big %d, %d+...\n", szjc, (szjc)/ MAX_TEXSIZE); 
                                                                            ^
src/pba/ProgramCU.cu:2199:76: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
makefile:49: recipe for target 'bin/out/ProgramCU.o' failed
make: *** [bin/out/ProgramCU.o] Error 1

Fix: open the makefile and replace:

NVCC_FLAGS = -I$(CUDA_INC_PATH) -O2 -Xcompiler -fPIC

with:

NVCC_FLAGS = -I$(CUDA_INC_PATH) -O2 -D_FORCE_INLINES -Xcompiler -fPIC

Source: https://github.com/BVLC/caffe/issues/4046

Compiling KiCAD from source code on Debian Sid

These are the steps I did to compile KiCAD on Debian 8 Sid:

Download the source code:

$ git clone https://github.com/KiCad/kicad-source-mirror

Create a build directory:

$ cd kicad-source-mirror/
$ mkdir -p build/release
$ cd build/release

Install the dependences:

$ sudo apt-get install libwxbase3.0-dev libwxgtk3.0-dev libgl1-mesa-dev libglew-dev libglm-dev libcurl4-openssl-dev libboost-dev libboost-thread-dev libboost-system-dev libboost-context-dev libssl-dev wx-common libpython-dev python-wxgtk3.0-dev swig3.0

//create a symbolic link to pretend be swig2.0 for cmake:
$ sudo ln -s /usr/bin/swig3.0 /usr/bin/swig2.0

Execute the cmake configuration:

$ cmake -DCMAKE_BUILD_TYPE=Release  -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_MODULES=ON -DKICAD_SCRIPTING_WXPYTHON=ON ../../
$ make
$ sudo checkinstall

Done! Now we have a cutting-edge KiCAD version installed on our system!

Testing the Nordic UART Service for nRF51822

Today I decided to test the Nordic Uart Service (NUS) to enable a serial communication (emulated) between a Bluetooh Low Energy device (nRF51822) and an Android device.

The Nordic SDK comes with an example (nordic/examples/ble_peripheral/ble_app_uart) used for serial communication over BLE. For more info:
https://devzone.nordicsemi.com/documentation/nrf51/6.0.0/s110/html/a00066.html

I download the SDK modified to compile with open-source toolchains:
https://github.com/relayr/nrf51-sdk.git

For more info read me previous post:
https://acassis.wordpress.com/2016/02/25/using-openocd-to-program-a-homebrew-nrf51822-board/

The compilation was not so easy as it is supposed to do. I got some undefined references, like this one:

.../newlib/libc/reent/sbrkr.c:58: undefined reference to `_sbrk' 

I fixed it editting “relayr/ld/libc-nano.ld” file and adding:

EXTERN(_sbrk_r)
EXTERN(_write_r)
EXTERN(_close_r)
EXTERN(_lseek_r)
EXTERN(_read_r)
EXTERN(_fstat_r)
EXTERN(_isatty_r)

Also I created a custom board definition based on wunderbar-master-nrf.h

$ cp relayr/include/wunderbar-master-nrf.h relayr/include/custom_board.h

And finally created a build.mk with all files needed to compile the example:

DEVICE_VARIANT?= xxaa

DEFINES+= NRF51 NRF51822_QFAA_CA BOARD_CUSTOM
SDKINCDIRS+= toolchain toolchain/gcc drivers_nrf/hal device libraries/scheduler
SDKINCDIRS+= softdevice/common/softdevice_handler libraries/timer
SDKINCDIRS+= ble/ble_advertising libraries/button ble/ble_services/ble_nus
SDKINCDIRS+= drivers_nrf/uart drivers_nrf/gpiote drivers_nrf/config drivers_nrf/common
SDKINCDITS+= drivers_nrf/hal libraries/fifo

EXPINCDIR+= bsp
EXPINCDIR+= ble_peripheral/ble_app_uart/config

SDKSRCS+= toolchain/gcc/gcc_startup_nrf51.s toolchain/system_nrf51.c
SDKSRCS+= libraries/timer/app_timer.c
SDKSRCS+= ble/common/ble_advdata.c
SDKSRCS+= ble/common/ble_conn_params.c
SDKSRCS+= softdevice/common/softdevice_handler/softdevice_handler.c
SDKSRCS+= libraries/scheduler/app_scheduler.c
SDKSRCS+= libraries/timer/app_timer_appsh.c
SDKSRCS+= drivers_nrf/uart/app_uart_fifo.c
SDKSRCS+= ble/ble_services/ble_nus/ble_nus.c
SDKSRCS+= ble/ble_advertising/ble_advertising.c
SDKSRCS+= libraries/button/app_button.c
SDKSRCS+= drivers_nrf/gpiote/nrf_drv_gpiote.c
SDKSRCS+= drivers_nrf/common/nrf_drv_common.c
SDKSRCS+= libraries/fifo/app_fifo.c

EXPSRCS+= bsp/bsp.c
EXPSRCS+= bsp/bsp_btn_ble.c

USE_SOFTDEVICE?= s110

SDKDIR:= $(abspath $(dir $(lastword ${MAKEFILE_LIST})))
ifndef SDDIR
SDKINCDIRS+= softdevice/${USE_SOFTDEVICE}/headers
else
CFLAGS+= -I${SDDIR}/include
endif

SOFTDEV_HEX?= $(lastword $(wildcard ${SDKDIR}/nordic/components/softdevice/${USE_SOFTDEVICE}/hex/${USE_SOFTDEVICE}*softdevice.hex))

SDKINCDIRS+= $(sort $(dir ${SDKSRCS}) )

SRCS+= $(patsubst %,${SDKDIR}/nordic/examples/%,${EXPSRCS})

ifdef USE_RTX
DEFINES+= RTX __HEAP_SIZE=0 __STACK_SIZE=1024
SRCS+= ${SDKDIR}/nordic/external/rtx/port/RTX_Conf_CM.c
CFLAGS+= -I${SDKDIR}/nordic/external/rtx/include
LDLIBS+= ${SDKDIR}/nordic/external/rtx/source/GCC/libRTX_CM0.a
endif

ifeq ($(filter FALSE false NO no 0,${USE_SIMBLE}),)
include ${SDKDIR}/relayr/src/build.mk
endif

CPPFLAGS+= $(patsubst %,-D%,${DEFINES})

CFLAGS+= -I${SDKDIR}/relayr/include
CFLAGS+= $(patsubst %,-I${SDKDIR}/nordic/examples/%,${EXPINCDIR})

CFLAGS+= $(patsubst %,-I${SDKDIR}/nordic/components/%,${SDKINCDIRS})
CFLAGS+= -mcpu=cortex-m0 -mfloat-abi=soft -mthumb -mabi=aapcs	\
	-ffunction-sections -fdata-sections -fno-builtin \
	-fplan9-extensions
CFLAGS+= -std=gnu11
CFLAGS+= -fshort-wchar -Wl,--no-wchar-size-warning
CFLAGS+= -Wall -Wno-main -Werror
CFLAGS+= -g

LINKERSCRIPT?= gcc_nrf51_${USE_SOFTDEVICE}_${DEVICE_VARIANT}.ld

LDFLAGS+= -Wl,--gc-sections -fwhole-program --specs=nano.specs
LDFLAGS+= -Wl,-Map=${PROG}.map
LDFLAGS+= -Wl,-T,${SDKDIR}/relayr/ld/libc-nano.ld
LDFLAGS+= -Wl,-L${SDKDIR}/relayr/ld
LDFLAGS+= -Wl,-L${SDKDIR}/nordic/components/toolchain/gcc
LDFLAGS+= -Wl,-T,${LINKERSCRIPT}
LDFLAGS+= -lgcc -lc -lm -lg -lrdimon -lnosys

ASFLAGS+= -x assembler-with-cpp


SRCS+=	$(patsubst %,${SDKDIR}/nordic/components/%,${SDKSRCS})


CC=	arm-none-eabi-gcc
OBJCOPY=	arm-none-eabi-objcopy
OBJDUMP=	arm-none-eabi-objdump
GDB=	arm-none-eabi-gdb

GENERATE.d=	$(CC) -MM ${CFLAGS} ${CPPFLAGS} -MT $@ -MT ${@:.d=.o} -MP -MF $@ $<
COMPILE.s=	${COMPILE.S}


all: ${PROG}.hex ${PROG}.bin

define compile_source
ifneq ($(filter %.c %.S %.s,${1}),)
$(addsuffix .o,$(notdir $(basename ${1}))): ${1}
	$${COMPILE$(suffix ${1})} $${OUTPUT_OPTION} $$<
endif

ifneq ($(filter %.c,${1}),)
$(addsuffix .d,$(notdir $(basename ${1}))): ${1}
	$$(GENERATE.d)
endif

OBJS+=	$$(addsuffix .o,$(notdir $(basename ${1})))
endef

$(foreach f,${SRCS},$(eval $(call compile_source,$f)))

ifneq (${MAKECMDGOALS},clean)
-include $(patsubst %.o,%.d,${OBJS})
endif

CLEANFILES+= ${OBJS} ${OBJS:.o=.d} ${PROG}.hex ${PROG}.elf ${PROG}.bin ${PROG}.map ${PROG}.jlink ${PROG}-all.jlink

${PROG}.elf: ${OBJS}
	${CC} -o $@ ${CFLAGS} ${LDFLAGS} ${OBJS} ${LDLIBS}

%.hex: %.elf
	${OBJCOPY} -O ihex $< $@

%.bin: %.elf
	${OBJCOPY} -O binary $< $@

%.jlink: %.hex
	${OBJDUMP} -h $< | \
	awk '$$1 ~ /^[0-9]+$$/ {addr="0x"$$5; if (!min || addr < min) min = addr} END { printf "\
	loadbin %s,%s\n\
	r\n\
	g\n\
	exit\n", f, min}' f="$ $@

%-all.jlink: %.jlink ${SOFTDEV_HEX} FORCE
	@[ -e "${SOFTDEV_HEX}" ] || echo "cannot find softdevice hex image '${SOFTDEV_HEX}'" >&2
	# w4 0x4001e504, 0x2 -> enable erase: CONFIG.WEN = EEN
	# w4 0x4001e50c, 0x1 -> erase all: ERASEALL = 1
	printf "\
	device NRF51822_XXAA\n\
	halt\n\
	w4 0x4001e504, 0x2\n\
	w4 0x4001e50c, 0x1\n\
	sleep 1\n\
	loadbin %s,0\n" ${SOFTDEV_HEX} > $@
	cat $> $@

flash: ${PROG}.hex ${PROG}.jlink
	JLinkExe -device nRF51822_xxAA -if SWD ${PROG}.jlink

flash-all: ${PROG}.hex ${SOFTDEV_HEX} ${PROG}-all.jlink
	JLinkExe -device nRF51822_xxAA -if SWD ${PROG}-all.jlink

gdbserver: ${PROG}.elf
	JLinkGDBServer -device nRF51822_xxAA -if SWD

gdb: ${PROG}.elf
	${GDB} ${PROG}.elf -ex 'target extended-remote :2331'

GITREV= $(shell git describe --always)
MAILFILE= ${PROG}-${GITREV}.hex
CLEANFILES+= ${PROG}-*.hex

mailfile: ${MAILFILE}
	-$(foreach f,$(filter-out $<,$(wildcard ${PROG}-*.hex)),rm $f;)
	-@md5sum $<
	-@sha256sum $<

${PROG}-${GITREV}.hex: ${PROG}.hex
	cp $< $@

clean:
	-rm -f ${CLEANFILES}

.PHONY: all flash flash-all gdbserver gdb clean FORCE

Running NuttX on a less than U$2.00 board

Few months ago I discovered a low cost board powered by STM32F103C8T6 microcontroller.

That board is referenced as “STM32 Minimum System Development Board” or as “BluePill Board”:

http://www.cnx-software.com/2016/05/17/bluepill-is-a-2-arduino-compatible-development-board-based-on-stmicro-stm32-mcu/

http://www.stm32duino.com/viewtopic.php?t=117

I bought that board from Aliexpress for U$1.96:
http://aliexpress.com/item/STM32F103C8T6-ARM-STM32-Minimum-System-Development-Board-Module-ForArduin/32282374854.html

Then when it arrived I got NuttX running on it and submitted a patch to Mr. Greg to add it to NuttX mainline. Now everybody can get NuttX running on it easily.

This tutorial will explain how to do that, first let me list what you will need:
– The STM32F103C8T6 Minimum board;
– A STLinkV2 programmer (or a low cost clone) ;
– A USB/Serial adapter 3.3V compatible (like this one on ebay);
– A USB to MicroUSB cable, like these used to recharge your smartphone;
– A computer running Linux Debian or Ubuntu (it is possible on Windows using Cygwin or Mac OS, but I don’t use these OS).

First step is the instalation of development tools:
1) Install gcc-arm-none-eabi package:

$ sudo apt-get install gcc-arm-none-eabi

2) Compile and install OpenOCD
Note: If your system doesn’t have the development tools and libraries then install these packages listed here: https://acassis.wordpress.com/2013/10/07/quais-pacotes-de-desenvolvimento-instalar-no-linux/

$ git clone http://repo.or.cz/r/openocd.git
$ cd openocd
$ ./bootstrap
$ ./configure --enable-internal-jimtcl --enable-maintainer-mode --disable-werror --disable-shared --enable-stlink --enable-jlink --enable-rlink --enable-vsllink --enable-ti-icdi --enable-remote-bitbang

You will see it at end of this process:

libjaylink configuration summary:
 - Package version ................ 0.1.0
 - Library version ................ 0:0:0
 - Installation prefix ............ /usr/local
 - Building on .................... x86_64-pc-linux-gnu
 - Building for ................... x86_64-pc-linux-gnu



OpenOCD configuration summary
--------------------------------------------------
MPSSE mode of FTDI based devices        yes (auto)
Segger J-Link JTAG Programmer           yes
ST-Link JTAG Programmer                 yes
TI ICDI JTAG Programmer                 yes
Keil ULINK JTAG Programmer              yes (auto)
Altera USB-Blaster II Compatible        yes (auto)
Versaloon-Link JTAG Programmer          yes
OSBDM (JTAG only) Programmer            yes (auto)
eStick/opendous JTAG Programmer         yes (auto)
Andes JTAG Programmer                   yes (auto)
USBProg JTAG Programmer                 yes (auto)
Raisonance RLink JTAG Programmer        yes
Olimex ARM-JTAG-EW Programmer           yes (auto)
CMSIS-DAP Compliant Debugger            yes (auto)

Now compile and install it:

$ make
$ sudo make install

Now the next step is download and compiling NuttX:

1) Download the NuttX kernel and its applications:

$ mkdir NuttX
$ cd NuttX
$ git clone https://bitbucket.org/nuttx/nuttx
$ git clone https://bitbucket.org/nuttx/apps
$ git clone https://bitbucket.org/nuttx/tools

2) Compile the Kconfig Frontend needed by NuttX:

$ cd tools/kconfig-frontends
$ ./configure
$ make
$ sudo make install

3) Compile NuttX for stm32f103-minimum board:

$ cd ../..
$ cd nuttx/tools
$ ./configure.sh stm32f103-minimum/nsh
$ make menuconfig

Enter into "Build Setup" menu and confirm that "Build Host Platform" is defined to Linux
Enter in "System Type" -> "Toolchain Selection" and confirm that:
(X) Generic GNU EABI toolchain under Linux

Select <EXIT> and confirm to save everything.

Now you can compile it:

$ make

At end of compilation you will see:

make[2]: Leaving directory '/tmp/NuttX/nuttx/configs/stm32f103-minimum/src'
LD: nuttx
make[1]: Leaving directory '/tmp/NuttX/nuttx/arch/arm/src'
CP: nuttx.bin

3) Flashing the firmware nuttx.bin in the stm32f103-minimum board:
Connect the USB Cable and the STLinkV2 programmer to STM32F103 board this way:

Create a file openocd_stm32f1.cfg with this content:

# Using stlink as SWD programmer
source [find interface/stlink-v2.cfg]

# SWD as transport
transport select hla_swd

# Use STM32F103 target
set WORKAREASIZE 0x4000
source [find target/stm32f103c8t6.cfg]

Execute OpenOCD passing this configuration file:

$ sudo openocd -f openocd_stm32f1.cfg

Open On-Chip Debugger 0.10.0-dev-00300-g89bf96f-dirty (2016-05-20-17:42)
Licensed under GNU GPL v2
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
none separate
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v17 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.297181
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints

Open a new shell terminal and execute:

$ telnet 127.0.0.1 4444

You will be presented with this message:

Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Open On-Chip Debugger
> 

Now execute this command to store nuttx.bin in the stm32f103 flash memory:

> reset halt

stm32f1x.cpu: target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x080003ac msp: 0x20000730

> flash write_image erase nuttx.bin 0x08000000

auto erase enabled
device id = 0x20036410
ignoring flash probed value, using configured bank size
flash size = 128kbytes
stm32f1x.cpu: target state: halted
target halted due to breakpoint, current mode: Thread 
xPSR: 0x61000000 pc: 0x2000003a msp: 0x20000730
wrote 40960 bytes from file nuttx.bin in 2.384699s (16.774 KiB/s)
> 

Finally all you need to do is to connect a USB/Serial and use a Serial Console as Minicom/Picocom/Screen to get access to NuttX terminal .

-------------------------------
|USB/Serial | STM32F103 Board |
-------------------------------
|   RXD     |       A9        |
|   TXD     |      A10        |
|   GND     |       G         |
-------------------------------

Configure Minicom or use your preferred serial program to 115200 8n1 with your USB/Serial adapter, i.e /dev/ttyUSB0. You will get this message after pressing the RESET button:

NuttShell (NSH)
nsh> 

Getting started with RFM69

The RF transceivers RFM69 are really nice for low power applications. There are many projects using it currently.

It supports FSK, GFSK, MSK, GMSK and OOK modulations. Also it has AES and CRC-16 engines internally.

I decide to list some projects here as future reference.

First project is called RadioHead (no! it is not the music band). The main advantage of RadioHead is because it supports many types of transceivers (nRF24, CC1100, MRF89, etc) :
http://www.airspayce.com/mikem/arduino/RadioHead/

The second project is from LowPowerLab, it is devoted exclusively to RFM69 family:
https://github.com/LowPowerLab/RFM69

Other project devoted to RFM69 is plainRFM69, this project has some optimization to enter on low power mode as soon os possible and doesn’t have all features from previous project:
https://github.com/iwanders/plainRFM69

There is an interesting thread from iwanders (Ivor Wanders is the author of plainRFM69) :
https://forum.pjrc.com/archive/index.php/t-27442.html

Another interesting project: Using a RFM69 to control a KaKu switch with OOK modulation:
http://members.home.nl/hilcoklaassen/

I receive some RFM69HW modules (bought from Alibaba) and my plan is to use it with NuttX, this transceiver has many features, then creating a Network Driver is not so easy. The datasheet is here: http://www.hoperf.com/upload/rf/RFM69HW-V1.3.pdf

Running NuttX on Teensy 3.1

The PJRC Teensy 3.1 board is a very nice and powerful board. It has a small form-factor powered by NXP/Freescale MK20DX256 ARM Cortex-M4 microcontroller at 72MHz.

Normally it is used to run Arduino compatible sketches. Since I’m not a great Arduino fan the logic thing to do is run something else on it.

Fortunately NuttX has support to this board.

These are the steps I did to get it running:

1) Download the teensy loader for your platform:

https://www.pjrc.com/teensy/loader_linux.html

$ gunzip teensy.64bit.gz 
teensy.64bit
$ mv teensy.64bit teensy_loader
$ chmod a+x teensy_loader
$ sudo cp teensy_loader /usr/local/bin/

3) Get the udev rules and copy it to right place:

$ wget https://www.pjrc.com/teensy/49-teensy.rules
Resolving www.pjrc.com (www.pjrc.com)... 67.19.59.50
Connecting to www.pjrc.com (www.pjrc.com)|67.19.59.50|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1622 (1.6K) [text/plain]
Saving to: ‘49-teensy.rules’

49-teensy.rules                100%[=================================================>]   1.58K  --.-KB/s    in 0s      

2016-04-16 15:23:31 (47.7 MB/s) - ‘49-teensy.rules’ saved [1622/1622]

$ sudo cp 49-teensy.rules /etc/udev/rules.d/

3) Clone NuttX mainline bitbucket apps and nuttx repositories.

$ mkdir nuttx_teensy
$ cd nuttx_teensy
$ git clone https://bitbucket.org/nuttx/nuttx
$ git clone https://bitbucket.org/nuttx/apps

4) Compile NuttX to Teensy 3.1:

$ cd nuttx
$ cd tools/
$ ./configure.sh teensy-3.x/nsh
$ cd ..
$ make menuconfig
  Build Setup  --->
    Build Host Platform (Linux)  --->

$ make
...
LD: nuttx
make[1]: Leaving directory '/comum/workspace/NuttX/nuttx/nuttx/arch/arm/src'
CP: nuttx.hex
CP: nuttx.bin
$

5) Plug Teensy 3.1 on USB cable and press the board’s button.

6) Now run the teensy loader:

$ teensy_loader
File ->
  Open HEX File
    Select nuttx.hex

Click on Program icon Button it will program nuttx.hex in the board

7) Connect a USB/Serial 3.3V to Teensy 3.1 board, this way:

-----------------------------
USB Serial | Teensy Board pin
-----------------------------
   GND     |       GND
   TXD     |        0
   RXD     |        1
-----------------------------

8) Run minicom or other serial console program
Configure it to use your USB/Serial port as 115200 8n1

Now in the teensy load program click on Reset icon Button, the NuttX shell will appear:

NuttShell (NSH)
nsh> ?
help usage:  help [-v] []

  [           cmp         free        mkfifo      set         unset       
  ?           dirname     help        mh          sh          usleep      
  basename    dd          hexdump     mv          sleep       xd          
  break       echo        kill        mw          test        
  cat         exec        ls          pwd         time        
  cd          exit        mb          rm          true        
  cp          false       mkdir       rmdir       uname       

Builtin Apps:
nsh> 

Hiding the blinking cursor of video console

I’m customizing a Linux distro to boot with a logo in full-screen.
So far so good, except the Linux video logo insist to show “boot-logo bigger than screen size” when using an 800×600 image with 800×600 resolution.

If I use a 800×600 image with 1024×768 resolution it work, but it is not full screen, because the logo background that I want to use is not black.
Even more interesting is if I use a 640×480 image with 640×480 resolution it works:

Note the blink cursor at upper left corner when the system is initializing.
Fortunately some one already found a way to fix it.
I just need to edit the linux/drivers/tty/vt/vt.c line 1640 replacing:

vc->vc_deccm		= global_cursor_default;
to
vc->vc_deccm            = 0;

In the kernel command line I’m passing:

console=null vga=785 quiet

Also in the autologin user ~/.xinitrc I put the command to run the application!

Source: http://www.arm9board.net/wiki/index.php?title=Create_your_own_boot_logo