are there any hello world applications using OpenChronos-ng?

261 views
Skip to first unread message

Ben Dang

unread,
Sep 10, 2012, 5:00:24 PM9/10/12
to openc...@googlegroups.com
Hi all,

I'm trying to get head wrapped around developing applications for this watch.  I've searched high and low but I can't find any Hello World examples using this framework.  Can anyone help point me in the right direction?

-Ben

Paolo Di Prodi

unread,
Sep 10, 2012, 5:41:12 PM9/10/12
to openc...@googlegroups.com
Yes is quite easy, you have to instantiate a new module.
Go in the folder modules and create two files:
helloworld.c
helloworld.cfg

include only:

#include <openchronos.h>
/* driver */
#include <drivers/display.h>

then:
void helloworld_init()
{
menu_add_entry(NULL, NULL,
NULL,
NULL,
NULL, NULL,
&hello_activated,
&hello_deactivated);
}
then:
static void hello_activated()
{
/* Force redraw of the screen */
        display_chars(NULL, LCD_SEG_L1_1_0, (uint8_t*)"ERR", SEG_SET)'
refresh_screen();
}

static void hello_deactivated()
{
/* clean up screen */
display_clear(NULL, 1);
}
compile and enjoy.
Feel free to contact me if you get trouble!
--
Dr. Paolo Di Prodi


Ben Dang

unread,
Sep 11, 2012, 12:58:32 AM9/11/12
to openc...@googlegroups.com
Thanks Dr. Paolo.  That actually makes a lot more sense; but now I am stumped once again.  I flashed my watch via Wireless Update with the default openchronos-ng.  I get a blank screen.  Thinking the update might be botched, I recovered back to default TI's firmware through JTAG.  I then flashed the watch with openchronos-ng via JTAG as well.  Same blank screen.

1. Is the blank screen normal?

2. Is the wireless update very fincky?  I tried both under Linux and Windows.  I am never lucky with wireless update on Windows, but sometimes lucky under Linux.

Paolo Dev

unread,
Sep 11, 2012, 2:18:19 AM9/11/12
to openc...@googlegroups.com
No problem.
First what version did you install? The main or the testing branch?
What FCC version of your compiler do you have? The current firmware must be compiled with the LTS version of msp430, that you have to build yourself if you are on Ubuntu .
Second did you set up the frequency in make config?

Sent from my iPad

Angelo Arrifano

unread,
Sep 11, 2012, 3:24:07 AM9/11/12
to openc...@googlegroups.com
Hello Ben,

Also have a look to our development docs:
http://openchronos-ng.sourceforge.net/api/

Like Paolo pointed out, the blackscreen is probably caused due to a
bug in the linker (we are using a experimental linker flag which is
only working correctly in specific version).

For the toolchain version, see the README file in the repository:
http://sourceforge.net/p/openchronos-ng/code/ci/53b1a83bcb35bf8f13c74a684bac3e55ec706a29/tree/

Also, at this point I recommend that you use the testing branch
instead of master.

Regards,
Angelo
Reply all
Reply to author
Forward
0 new messages