PINE64
Development platform for PineTime images? - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PineTime (https://forum.pine64.org/forumdisplay.php?fid=134)
+--- Forum: General Discussion on PineTime (https://forum.pine64.org/forumdisplay.php?fid=135)
+--- Thread: Development platform for PineTime images? (/showthread.php?tid=10243)



Development platform for PineTime images? - ichibon-brosan - 06-14-2020

Hello friends... I have received my first few batches of Pine hardware, specifically a USA version of the PineBook Pro, the PineTime developer kit, a clusterboard, and 7 modules. I have a PinePhone on order but no information on expected arrival.

I would like to start learning to program the PineTime but all the forum postings I have read so far refer to programming the watch using an Android phone, which I don't happen to own. So I have some easy questions, in no particular order... 

Can I develop firmware for the PineTime using my PineBook Pro? 

Can I do any of this before I receive my PinePhone or am I out of business until then?

Is my iPhone 7Plus of any value in this matrix in the mean time?

I have a j-link mini (edu) and a j-link edu. Can either of these be used to program the PineTime using OpenOCD?

Or do I need to buy something else specifically? If so what?

I am really looking forward to getting started :-)

Thanks, Douglas


RE: Development platform for PineTime images? - mcr314 - 06-14-2020

I'm not sure I understand buying the entire Pine*, it's not like these things go exclusively together. In general, you will write code in C on a Unix-platform, probably Linux, maybe MacOS, and if you like cruel and unusual punishment, using the Linux Binary environment on Winblows.
There are a few RTOS that run on PineTime, the one I know is RIOTOS, and you develop that on a Linux desktop/laptop using your favourite editor and make. You program the watch using some python tools that drive the right pins. An Android phone is not involved in writing code for the watch. The watch is designed to communicate over BTLE with a smartphone, and given that Android phones are way easier to debug than Apple iOS phones, since you can actually open them (metaphorically, logically, and physically), it's hardly surprising that most howto's on BTLE tutorials deal with using AndroidWear.
Programming for a very restricted environment like the PineTime is not where I'd start, if this is to your introduction to programming or embedded programming. I get the impression that this might be the case for you, but I could be entirely wrong.


RE: Development platform for PineTime images? - VMMainFrame - 06-14-2020

(06-14-2020, 10:03 AM)ichibon-brosan Wrote: Hello friends... I have received my first few batches of Pine hardware, specifically a USA version of the PineBook Pro, the PineTime developer kit, a clusterboard, and 7 modules. I have a PinePhone on order but no information on expected arrival.

I would like to start learning to program the PineTime but all the forum postings I have read so far refer to programming the watch using an Android phone, which I don't happen to own. So I have some easy questions, in no particular order... 

Can I develop firmware for the PineTime using my PineBook Pro? 

Can I do any of this before I receive my PinePhone or am I out of business until then?

Is my iPhone 7Plus of any value in this matrix in the mean time?

I have a j-link mini (edu) and a j-link edu. Can either of these be used to program the PineTime using OpenOCD?

Or do I need to buy something else specifically? If so what?

I am really looking forward to getting started :-)

Thanks, Douglas

The answer to all your questions is basically YES.  I programmed my Pinetime using OpenOCD and an ST-Link without using an Android phone.  I had to use a Raspberry Pi to unlock the Pinetime first, but I believe a J-Link can do that.  Once a bootloader is installed using an St-Link or J-Link then the application code can be downloaded over Bluetooth using Linux or Android.  Danielt supplies tools for doing this on Linux.  Danielt and Lupyuen have excellent documentation.

https://github.com/daniel-thompson/wasp-os

https://github.com/lupyuen/visual-embedded-rust/blob/master/README.md

I have a lot of experience with large computers, from mainframes to laptops, but not much experience with smaller devices.  It took me a while and a learning curve but I got there.

Hugh


RE: Development platform for PineTime images? - danielt - 06-15-2020

(06-14-2020, 11:14 AM)VMMainFrame Wrote: The answer to all your questions is basically YES.  I programmed my Pinetime using OpenOCD and an ST-Link without using an Android phone.  I had to use a Raspberry Pi to unlock the Pinetime first, but I believe a J-Link can do that.  Once a bootloader is installed using an St-Link or J-Link then the application code can be downloaded over Bluetooth using Linux or Android.  Danielt supplies tools for doing this on Linux.  Danielt and Lupyuen have excellent documentation.

https://github.com/daniel-thompson/wasp-os

https://github.com/lupyuen/visual-embedded-rust/blob/master/README.md

I have a lot of experience with large computers, from mainframes to laptops, but not much experience with smaller devices.  It took me a while and a learning curve but I got there.

Documentation is definitely the key to making a hackable watch more accessible to people without a microcontroller background and I'm certainly trying to do my best on the wasp-os bits. However for the overall device it is important the wiki gets as good as it can be.

As you allude to, one of the biggest challenges to get started with PineTime are that documentation on how to do the initial programming is still a bit fragmented but its getting better, there was a big reorg a few weeks back and it does look like edits are starting to flow nicely now. More work is still needed (and probably always will be) but I'd encourage anyone who does get a programmer to work to think about how the docs could be improved so it is (incrementally) easier for the next person.


RE: Development platform for PineTime images? - ichibon-brosan - 07-20-2020

(06-14-2020, 10:33 AM)mcr314 Wrote: I'm not sure I understand buying the entire Pine*, it's not like these things go  exclusively together.  In general, you will write code in C on a Unix-platform, probably Linux, maybe MacOS, and if you like cruel and unusual punishment, using the Linux Binary environment on Winblows.
There are a few RTOS that run on PineTime, the one I know is RIOTOS, and you develop that on a Linux desktop/laptop using your favourite editor and make.  You program the watch using some python tools that drive the right pins.  An Android phone is not involved in writing code for the watch.  The watch is designed to communicate over BTLE with a smartphone, and given that Android phones are way easier to debug than Apple iOS phones, since you can actually open them (metaphorically, logically, and physically), it's hardly surprising that most howto's on BTLE tutorials deal with using AndroidWear.
Programming for a very restricted environment like the PineTime is not where I'd start, if this is to your introduction to programming or embedded programming.  I get the impression that this might be the case for you, but I could be entirely wrong.

Thank you very much for your response. I appreciate your thoughts.

I am a very experienced firmware engineer with extensive experience in machine communications.
This is my first experience thou programming a watch or using BTLE.

As for buying Pine*, I am always learning new things and I was intrigued by the products. For instance, I bought the Pine64so ClusterBoard and have the seven modules purring away and it has been the ideal host for my Virtual Protocol Adapter development, which is a distributed application that among other things will communicate with the phone and PineBookPro.