[riot-notifications] [RIOT-OS/RIOT] Riot Kinetis K64 MCU support - Hexiwear watch example? (#7596)

Soheil Qanbari notifications at github.com
Wed Sep 13 16:15:30 CEST 2017


Hi,

I appreciate if there is any example for the **Riot OS Kinetis K64 board**. I have bought the **[Hexiwear](http://www.hexiwear.com) Watch POWER USER PACK** and would like to program it using the RIOT. I wrote a simple blink program, however it is not working. Here is the flashing log:

   text	   data	    bss	    dec	    hex	filename
 120476	    444	   8496	 129416	  1f988	/home/vagrant/RIOT/examples/toggle-led/bin/frdm-k64f/Toggle-LED.elf
/home/vagrant/RIOT/dist/tools/openocd/openocd.sh flash-elf
### Flashing Target ###
/home/vagrant/RIOT/examples/toggle-led/bin/frdm-k64f/Toggle-LED.elf is fine.
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
Info : add flash_bank kinetis kx.flash
cortex_m reset_config sysresetreq
adapter speed: 1000 kHz
Info : CMSIS-DAP: SWD  Supported
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : CMSIS-DAP: FW Version = 1.0
Info : SWCLK/TCK = 0 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x2ba01477
START...
Info : SWD DPIDR 0x2ba01477
Error: Failed to write memory at 0xe0001058
Info : kx.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : MDM: Chip is unsecured. Continuing.
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* kx.cpu             cortex_m   little kx.cpu             reset
START...
Info : MDM: Chip is unsecured. Continuing.
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x000007a4 msp: 0x1fff0200
auto erase enabled
Info : Probing flash info for bank 0
Warn : Flash Configuration Field written.
Warn : Reset or power off the device to make settings effective.
wrote 122880 bytes from file /home/vagrant/RIOT/examples/toggle-led/bin/frdm-k64f/Toggle-LED.elf in 10.854154s (11.056 KiB/s)
START...
Info : MDM: Chip is unsecured. Continuing.
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x000007a4 msp: 0x1fff0200
34 bytes written at address 0x20000000
downloaded 34 bytes in 0.009277s (3.579 KiB/s)
target halted due to breakpoint, current mode: Thread 
xPSR: 0x01000000 pc: 0x20000020 msp: 0x1fff0200
verified 120920 bytes in 2.045297s (57.735 KiB/s)
START...
Info : MDM: Chip is unsecured. Continuing.
shutdown command invoked
Done flashing
/home/vagrant/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "115200"
No handlers could be found for logger "root"
2017-09-13 13:19:43,602 - INFO # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
help
tgl

Here is my simple program:
extern "C" {
#include "shell.h"
#include <stdio.h>
#include <board.h>
}
#include <iostream>

// Example how to use FlatBuffers to create and read binary buffers.

int toggleTest(int argc, char **argv)
{  
    printf("The LED toggle function called to toggle LED0\n");
	LED0_TOGGLE;
	LED1_TOGGLE;
    return 0;
}
static const shell_command_t commands[] = {
        { "tgl", "toggle LED0", toggleTest },
        { NULL, NULL, NULL }
};
int main(void)
{
    char line_buf[SHELL_DEFAULT_BUFSIZE];
    shell_run(commands, line_buf, SHELL_DEFAULT_BUFSIZE);
    return 0;
}

Here is my build command:

**make BOARD=frdm-k64f clean all flash term**

Any thoughts is appreciated. It would be great to have an example for the  [Hexiwear](http://www.hexiwear.com) watch. 

Thank you.

 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/issues/7596
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20170913/ffc2e1bb/attachment.html>


More information about the notifications mailing list