Why Monkey C?

I don't find any search results in this forum or anywhere on the web that answers this question. So therefore I am going to pose it here. Why did Garmin decide to invent or use a very obscure language (if not invented) for development? Why not use one of many well established languages? It is based on a VM and there are plenty of languages that leverage a VM.

I feel this may make it more difficult for newcomers to get into it (even though it is relatively easy) and also makes it hard to use standard dev tools. No IDE I have correctly highlights the code, neither does Github. And perhaps a more standard language will encourage more third parties to support Garmin as a smartwatch.
  • So, when was the last time you wrote an app that used less than 16k of memory, or the last environment where you could write a full blown activity app, with a dozen screens in 80k? I've had apps like that in the store for years.

    MonkeyC isn't that obscure, as there are thousands of developer using it, and I will say, it's a great fit for Garmin the environment. Have you looked at CIQ in Eclipse with the plugin? There IS an IDE. Seems that reading the start of the programmer's guide could help you understand the environment. There's also the ebook about CIQ, and the UX guide in the SDK

    Seems you are a bit frustrated, and that's part of the purpose of this forum - to help explain things to new folks. Feel free to ask things here!
  • What gave you the impression that I am frustrated? Please don't read too much into this. I am using the Eclipse IDE indeed, it works fine but still is not ideal as it does not treat the .mc files as proper code files so all of eclipse's features are not present. I already wrote my own app in Monkey C (a transit app) for personal use. It seems to be fairly easy to get into, which is what I mentioned in the brackets. I am just very intrigued as the only place I see Monkey C being used is at Garmin and I can not find examples of its usage outside of Connect IQ.

    I actually am very delighted that Garmin provides very useable documentation. My prior experience coding for such tiny devices was with my recently bought and returned Fitbit Versa, which used JS. That experience was not a bit rougher due to lack of documentation, so funnily enough it was tougher to get into despite using a crazy popular language. I do not know for sure its memory constraints but I think they deal with about 64 KB of memory.

    Plus, please are you seriously suggesting that Monkey C is the only way to deal with devices having 16 KB of memory? What about the king of low level languages, C itself? Sure it is super barebones, but one could have built an SDK out of a modded out C instead or may be C++ which is probably going to be a good mix of OOP and performant, instead of using something that will ultimately run on a VM. Which is why, out of curiosity I was just trying to know why this choice was made, or at least learn more about Monkey C's origin story as there is no info on Wikipedia too! :(
  • this old powerpoint by Alpha Monkey talks about the origins and the why of monkey c, great stuff :)
  • this old powerpoint by Alpha Monkey talks about the origins and the why of monkey c, great stuff :)


    Thanks! That is very cool and definitely adds more knowledge. I wish I could listen to the presentation that went with the slides as I am sure it was very informative. I am not aware of the design choices that go into picking the various components for a new platform such as this back then, so I am sure I'd learn a lot from understanding the whys that went into designing Connect IQ and the language used for coding for it.

    EDIT: Neato, I found the video for the talk. I'll link the blog post here for added discoverability: https://developer.garmin.com/index.php/blog/post/connect-iq-and-the-wearable-world
  • I came across your post a bit too late. I’m also curious why Garmin decided to invent Monkey C. Unfortunately the link above does not exist anymore. Do you have a new one?

  • Unfortunately the link above does not exist anymore. Do you have a new one?

    May be this one https://www.youtube.com/watch?v=q_ghKkrl3KE

  • There's also this (it's a comment/link to a podcast by a Garmin employee about device internals)

    https://the5krunner.com/2022/04/29/garmin-epix-2-review/#comment-107584

    Check out this podcast. https://cppcast.com/brad-larson-cpp-watch/

    If you follow the tech stack stuff at all, it becomes amazing that these watches do so much and franks work at all. Garmin has a drastically simplified architecture relative to Apple. It’s not really based on a operating system or barely an operating system — nothing like the Unix model in Apple WatchOS or Google WearOS.

    – no memory protection at all
    – no processes
    – no kernel protection or kernel vs user concept
    – everything is a single process with threads
    – everything is C and C++
    – The connectIQ interpreter is a thread running in this stuff (and an interpreter is expensive in terms or compute which means battery overhead)
    – basically any programming error can hang or crash the watch

    It’s a punishing environment for the Garmin engineers to work in. But on the other hand that is how they get so much more battery life than WearOS and WatchOS. I’m now astonished that ConnectIQ works at all, let alone as well as it does.

  • There's actually an O'Reilly book about CIQ.  It came out some time back, and there was a PDF of it, but. I looked around and couldn't find a link.  They passed out hard copies at one of the summits.  It's really dated right now as it was for CIQ 1

  • November 2016: First Edition. For a technical book, it seems to be old. Any new version for it?