Android Things Custom Hardware - android-things

I'm interested is it possible to install and use Android Things(former Brillo) on custom produced hardware?
I can see from the official documentation there is preselected and certified SoMs listed, but I'm interested in using my own hardware.
Is it possible to have best of both worlds - use the familiar to me Android & Android Things but run it on proprietary hardware?
If not, what other options do I have - I researched about micropython, but apparently it seems it also comes with designated board(pyboard).
So my question is what are options to not thinks too much about the firmware on the device(and write C code), but focus on more higher-level business logic and programming languages(Java, Python).

Android Things isn't open source, so you can't put it into that isn't officially supported.
If you're looking for custom options, you will need to find a compiled language like C that works for that board. While C may be a bit intimidating, you may be able to find languages that compile to similar machine code. Rust and Go may work on microcontrollers too if you check.
I'm not too familiar with micro python. It says that it compiles to bare metal/machine code, so I believe you should be able to use it on other boards. While they may officially support the compiler for one board, the community may have support for additional microcontrollers.

Related

Codename One (or ParparVM) how to compile Java library into iOS library

By checking the Codename One website and ParparVM Github, its guide only show how to build the Java (with Java Main function entry point) into the native executable/app (iOS), but I can't find any guide to build/compile Java into iOS share library (either in C source or binary, as long as can be reused by swift/objective-C from iOS app).
So are we able to do so? is there any guide for that?
It wasn't designed for that purpose so it probably won't work well for it. There are some inherent design decisions that would make it very difficult to get ParparVM to work with a library. Two big ones:
The GC needs to work with roots and would have a hard time collecting without full control of the app
The code generated looks "awful". Method names translate to very long function names in C with a very convoluted syntax to allow all sort of VM edge cases such as covariance
I suggest you look at J2ObjC. I haven't checked it out in ages but it was designed exactly with this use case in mind. It doesn't have a "real" GC but that might be OK with ARC. It works with your sources and produces libraries that look a bit more "natural" on iOS.

iOS assembly code

I would like to try some ARM assembly code with apple iOS just for educational purpose. I would like to start with some in line code within Xcode.
My understanding is that I need to compile for a iOS device, for example for my iPhone, which means that I need to pay $99/year for membership.
I don't think I can use ASM assembly code with a iOS phone simulator.
I am having an hard time on finding examples, books or documentation on ARM assembly code in Xcode env with an iPhone.
Am I doing this wrong? Maybe iOS is not the most user friendly environment to learn ARM Assembly.
Back up...
What are you trying to learn? Arm assembly or iOS programming? Pick one...
Do you have any assembly experience?
What is it you think you are wanting to learn in arm assembly? Jump in and write some full blown gui applications? You need to learn to put immediates in registers add and or and xor and save answers in registers. then read and write some memory locations. Learn to use the stack, make calls, etc. Then write your applications in C or whatever and use asm for hand tuning or use your asm skills to debug the compiler and or code. Writing applications or operating systems, etc in asm is for folks who want to make a statement, or have a specific reason, not for educational purposes.
There is some leaning toward a unified ARM assembly language that works both on the ARM based cores and the thumb2 based cores. Not for all of the assembly language needed but for places where you might want to write a module of code and not have to have a lot of if thumb elses littering the code. You can certainly get your feet wet with that here and take some of that code straight to full 32 bit ARM instructions on some other platform. thumbulator is thumb only, the common instruction set between the ARM based cores and the thumb2 based cores, basically it is the portable ARM instruction set, write the code once, it works on almost all of their cores.
If your goal is to learn iOS programming, get the kit or whatever and learn using whatever language they want you to learn, get proficient at that, learn the apis, etc. Then if you do some of the assembler stuff above then you can start to think about making calls to asm functions or inline assembler, etc, from your iOS programs. How much assembler, your choice. I wouldnt expect to see applications written in assembler for that platform I would instead search for how do I call this assembly code from my ios application or how do I do inline assembly. (dont learn inline assembly until you are good at real assembly).
There is no reason at all to pay for access to a simulator, there are many many arm simulators out there, one in mame, arms armulator in gdb and other places, a number of gameboy advance and nintendo ds simultators, etc, etc, etc. Of course there is qemu-arm. there are more simulators than you probably are willing to take the time to try, i am about 10 years or so into it myself and not tried them all.
learning assembly is not like C or python or java, I will write a minesweeper game to learn this language. You are learning the mechanics of moving the bits around, small steps, not writing usable applications. For example adding two 128 bit numbers using a 16 bit processor is a worthy assembly language project. Multiplying two numbers, any size, with a processor without a multiply instruction, that is another assembler type learning project. yes, I agree you CAN learn those things by calling asm from an iOS application, but if you dont already have the iOS developers kit and know how to write iOS applications, you have a lot of learning to do before you start thinking about assembler.
If I am way off the mark with what you were asking, no problem I will gladly remove this answer...
Even without a code signing cert, I think you should be able to go to the scheme pop-up menu (the right side of it) and choose "iOS Device"
Once you do that, then you can choose any .c or .m (or .cpp or .mm) file in your project, open the assistant editor, and choose "Assembly" from the assistant editor jumpbar. Then you can see your source code and assembly code side by side.
Or you can just go to Product menu and Generate Output -> assembly
You may find it easier to start with C code, where the function calls will be much easier to follow initially than Objective-C method calls.
What you need is an ARM development kit with a Linux-based programming toolkit. You can then install VirtualBox on your Mac, create a Linux virtual machine and install the ARM development tools on the virtual Linux machine. Make sure that when you buy an ARM dev kit, it comes with the ARM cpu, complete dev/test board, USB cables for software transfer/debugging and the complete Linux toolchain. You can find such kits for less than $99.
Another quick introduction to ARM assembly and reverse engineering: http://yurichev.com/writings/RE_for_beginners-en.pdf

ExEn (XNA -> iOS, Android) and accelerometers, etc

I've been reading about Andrew Russell's ExEn project and I'm wondering what the flow would be like for creating a WP7 accelerometer-based game and then porting it to another platform, say iOS. Here's what I hope would happen:
Create fully functional game in XNA, avoiding dependance on device
specific items like the 'back' button.
Run the project through ExEn (I have no idea on how this would
happen), creating fully functional iOS game.
Run game on iPhone.
Sorry for that pitiful outline, but I just don't have a solid high-level view after reading about it.
Also, being software conversion, surely it wouldn't totally work. How would you iron out the wrinkles? I assume you'd have to know iOS or Android fairly well to pin it down.
Anyway, if anyone can move me one step closer I would appreciate it.
ExEn is an implementation of a subset of the XNA API that runs on different platforms (including iOS and Android). Put simply, it makes the classes and methods that you use when writing XNA code available to you on these other platforms. (Plus appropriate instructions, examples, etc.)
When using ExEn, the bulk of your code should simply "just work". However in most real-world cases you will need to write at least some platform-specific code (and probably provide some platform-specific assets). In particular to support different device resolutions, and also in cases where you use XNA features not available in ExEn.
At time of writing, ExEn does not implement the XNA/WP7 APIs for accelerometer support. At some time in the future they may be added (either by me or anyone who wants to contribute a patch). ExEn is distributed as source code, so you could even add the necessary support yourself.
The alternative would be to write platform-specific code for the parts of your game that query the accelerometer. Using ExEn does not prevent you from also using the APIs of the underlying platform.
ExEn (on iOS and Android) runs on top of Xamarin's MonoTouch and Mono for Android products. These two products provide C# bindings for the underlying platform APIs. Also, much like ExEn implements the XNA APIs, Mono implements the .NET APIs. These products also provide you with the tools you need (IDE, compiler, debugger, etc).
So the iOS API that you would use is UIAccelerometer (doc). This is exposed in C# via MonoTouch.UIKit.UIAccelerometer (doc). I'll leave looking up the Android equivalents as an exercise.
You can't expect:
porting a game to other platform and don't modify it.
porting a game with special platform inherent abilities to other platform that lacks this abilities, or vice versa

Anyone ever tried to develop in C or C++ for Blackberry platforms?

Every indication I have, based on my experience in embedded computing is that doing something like this would require expensive equipment to get access to the platform (ICE debuggers, JTAG probes, I2C programmers, etc, etc), but I've always wondered if some ambitious hacker out there has found a way to load native code on a Blackberry device. Anyone?
Edit: I'm aware of the published SDK and it's attendant restrictions. I'm curious if anyone has attempted to get around them, and if so, how far they got.
I've seen this question pop up in a number of different forums over time. The original Blackberries were programmable in C++ but I think that RIM ran up against the problems of trying to implement a secure platform in the C/C++ compile to native paradigm.
The devices do have JTAG ports, but unless one could get hands on the RIM code as a place to start the problem is enormous.
I also have to wonder how useful a Blackberry with a replacement FOSS operating system would be, since it would not likely have the protocols to connect to BES or BIS, send PIN's etc. If one was simply looking for a the power of the hand held computing platform I suspect there are many more likely candidates available.
No, C++ is no longer a supported RIM development tool, as they phased it out a number of years ago. Client applications can be developed in Java (or one of a few 5GL frameworks), and web + sever-side apps can be developed using standard tools.
For those looking for updated information, the new Playbook os, also known as QNX, also known as Blackberry 10 (or it will be when the phones running it come out) is in fact c/c++ based, also using QML and a C++ add on called Cascades.
Unfortunately the official SDK website only seems to mention Java. According to wikipedia, different versions of the BlackBerry use different processors. Combined with the fact that RIM uses a proprietary operating system for the devices, it becomes pretty difficult to develop native code without official tools. There is also a partial API-level security restriction which would further prohibit advanced tinkering.
Just randomly searching for an answer to this and came across http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/Native-C-C-SDK/td-p/778009 which mentions that BB intend to release a C/C++ SDK soon, more details will be provided at the 2011 Game Developer Conference.

How to support multiple languages on a microcontroller?

I'm currently working on upgrading a product for the Chinese market. The target is a ARMTDMI7 with a QVGA display. Most resources I've located on the net are targeted at desktop or web programming rather than embedded devices.
Can anyone suggest some tools and
resources that might be useful?
What are the best techniques for
extracting literal strings and
communicating with translators?
I suggest looking at EasyGUI but that depends on what graphics controller you use.
EasyGUI is a tool that simplifies design of user interfaces and comes with complete source code and driver for a varity of display controllers.
For localization you can use EasyTranslate that gives the translater a graphical representation of the interface. This lets the translator see how the translated texts fit on the screen.
EasyGUI is available with unicode support aswell as right to left script.
Freetype might be good for rendering fonts.
www.freetype.org
There are many ARM microcontroller forums which will help you find what you're looking for.
Atmel has a line of ARM7 processors, and they are pretty friendly to those who make a hobby out of this, so there's a lot of information on this processor. It won't be the same, but generally the tools and libraries can be used across the ARM line so you might find some help here - you'll want to focus on the AT91SAM7 series.
If you have more specific questions, you will probably get some reasonable response here.
-Adam
It sounds like you need to upgrade an existing codebase to make it support multiple languages.
If so, the fact that this is on a microcontroller shouldn't be an issue - I'd drop that fromt he title and focus on the language you're using (c?) and ask how to convert your program for internationalisation.
This is a problem many people have solved on a variety of platforms, and the fact this you're on a microcontroller doesn't mean that the same tools and such don't apply - the relevant factor is the language you're using
-Adam

Resources