![]() |
[ASSEMBLER] How easy is it to get started asm coding on Maemo5?
Is it easy to get started coding assembler for the N900?
is there anything that needs to be taken in consideration when coding assembler for Maemo5 (...full hardware access? backgroundtasks? other conflicts?) which tools is most suited for assembler (developer environments, etc)? |
Re: [ASSEMBLER] How easy is it to get started asm coding on Maemo5?
I'd say that it's just as easy to use assembler on the N900 as on any stationary computer. Read up on ARM assembler and off you go, nothing special at all.
Out of curiosity, what would you want to create that's not possible in C? C with some inline assembler is a nice mix in my experience. Modern compilers are very good at optimization if this is the issue. |
Re: [ASSEMBLER] How easy is it to get started asm coding on Maemo5?
Quote:
But I think he wants direct access to hardware internals-acceleration, am I wrong? The language is not the problem. The drivers are the problem. |
Re: [ASSEMBLER] How easy is it to get started asm coding on Maemo5?
I might be wrong but I think you can't access NEON features with C compilers and you need to use assembly for them. It provides great acceleration in matrix/vector calculations.
|
Re: [ASSEMBLER] How easy is it to get started asm coding on Maemo5?
Quote:
And, I might be wrong but, the compiler generates assembler that is assembled into object code so arguing that the compiler can't do something comes across as a bit off target. |
Re: [ASSEMBLER] How easy is it to get started asm coding on Maemo5?
im very inexperienced.
ive only coded a little asm on x86, and a little computer each student had to build at school 10 years ago (based on Z80+RAM chips if i remember correctly) - that was supposed to control a matrix printer. ...anyway... yes, i was meaning everything in general, incl. hardware internals acceleration. there are only 2 reasons i want to use assembler. 1. Speed - i rather sacrifice compatibility in exchange for speed when coding for the N900 - why i needed to know if the OS makes some restrictions thats good to be aware of. 2. Reverse Engineering - if i get much more experienced, i want to take a look at the PowerVR driver (and some other drivers) to see if theres a reason that VSync dont work as it should on the N900. by comparing the N900 SGX driver to other phones SGX driver with the same chipset (Palm Pre, Motorola Droid, Iphone 3GS, etc) there may be some way to hack the driver to get better a better framebuffer in RAM, and activating VSync ...for that i will need alot of experience and find the Code that handles transfers to the framebuffer - and somehow force vsync, instead of realtime rendering. also reverse-engineering can be good to optimize the most hogging parts of the kernel and system background tasks. EDIT: PS. with reverse engineering i will probably need a disassembler to be able to understand the machine code, but i guess such already exists but i need to get started somewhere and i know its a far way to go if i want to get that good... i remember the author of ZSNES (fastest snes emu for x86) developed it as a asm project (and some c and c++) while learning assembler at the university. |
Re: [ASSEMBLER] How easy is it to get started asm coding on Maemo5?
Quote:
Quote:
Quote:
What would there be to do to get "a better framebuffer in RAM"? Quote:
Quote:
Quote:
|
Re: [ASSEMBLER] How easy is it to get started asm coding on Maemo5?
Another possible project would be to use the C6400 DSP. This DSP was top of the line a few years ago (2003), and still boasts substantial processing power to run various codecs.
www.ll.mit.edu/HPEC/agendas/proc03/powerpoints/orofino.ppt |
Re: [ASSEMBLER] How easy is it to get started asm coding on Maemo5?
To view this mail in a browser, copy
http://links.mkt2223.com/servlet/Mai...cyS0&mt=1&rt=0 into your browser. T E X A S I N S T R U M E N T S -------------------------------------------------------------------------- TI MAKES DSP PROGRAMMING EASY FOR ARM DEVELOPERS C6EZFlo, C6EZRun and C6EZAccel software development tools ease DSP programming The free C6EZFlo, C6EZRun and C6EZAccel software development tools simplify and accelerate DSP programming on a variety of DSPs and DSP + ARM SoCs. http://links.mkt2223.com/ctt?kn=41&m...cyS0&mt=1&rt=0 http://links.mkt2223.com/ctt?kn=26&m...cyS0&mt=1&rt=0 http://links.mkt2223.com/ctt?kn=43&m...cyS0&mt=1&rt=0 C6EZFlo allows developers to: - Drag and drop connection I/O blocks to peripherals on the DSP without needing to know DSP code, architecture or drivers - Generate clean, optimized C code that?s easy to read, modify and expand http://links.mkt2223.com/ctt?kn=41&m...cyS0&mt=1&rt=0 C6EZRun enables developers to: - Easily run ARM code on a DSP without learning DSP architecture or changing ARM code - Quickly partition the code between the DSP and the ARM core to improve overall performance - Utilize a familiar development environment to Linux(R) programmers with a GNU Compiler Collection (GCC)-like interface, simplifying the development experience http://links.mkt2223.com/ctt?kn=26&m...cyS0&mt=1&rt=0 C6EZAccel allows developers to: - Access a framework to over 130 optimized DSP kernels - Add product differentiation without writing DSP code or learning DSP architecture - Leverage the DSP to run ready-to-use algorithms, enabling efficient use of the SoC and avoiding processor upgrades http://links.mkt2223.com/ctt?kn=43&m...cyS0&mt=1&rt=0 The tools are ideal for adding intensive digital signal processing functionality such as: - Digital room correction capabilities to an audio system - People-counting capabilities to a video system - Power measurement and analysis to a power metering system C6EZFlo supports TI's C6000(TM) DSPs as well as DSP-based DaVinci(TM) digital media processors. C6EZRun and C6EZAccel support Integra(TM) DSP + ARM processors, DaVinci(TM) digital media processors and OMAP(TM) processors. http://links.mkt2223.com/ctt?kn=45&m...cyS0&mt=1&rt=0 http://links.mkt2223.com/ctt?kn=62&m...cyS0&mt=1&rt=0 http://links.mkt2223.com/ctt?kn=20&m...cyS0&mt=1&rt=0 http://links.mkt2223.com/ctt?kn=62&m...cyS0&mt=1&rt=0 http://links.mkt2223.com/ctt?kn=52&m...cyS0&mt=1&rt=0 C6EZRun and C6EZAccel are also available as a part of the free EZ software development kit (EZ SDK), now supporting the C6A816x Integra DSP + ARM processors. http://links.mkt2223.com/ctt?kn=60&m...cyS0&mt=1&rt=0 Download the free C6EZFlo, C6EZRun and C6EZAccel software development tools today! http://links.mkt2223.com/ctt?kn=41&m...cyS0&mt=1&rt=0 http://links.mkt2223.com/ctt?kn=26&m...cyS0&mt=1&rt=0 http://links.mkt2223.com/ctt?kn=43&m...cyS0&mt=1&rt=0 -------------------------------------------------------------------------- The right processor. The right software. The rightresources. -------------------------------------------------------------------------- To ensure delivery to your inbox, please add tiprime@dlep14.itg.ti.com to your address book or safe sender list. (C)Copyright 2011 Texas Instruments Incorporated, 12500 TI Blvd, Dallas, TX 75243. Read TI's Privacy Policy: http://links.mkt2223.com/ctt?kn=115&...jMxMjcyS0&rt=0 |
Re: [ASSEMBLER] How easy is it to get started asm coding on Maemo5?
"TI MAKES DSP PROGRAMMING EASY FOR ARM DEVELOPERS"
And what about THUMBEE? |
Re: [ASSEMBLER] How easy is it to get started asm coding on Maemo5?
It is very easy.
- Just install Binutils in N900 - Open texteditor (I use nano) and write code - Assemble with as-command - Link with ld-command - set execute rights with chmod - run (remember put ./ before your program name) But I have question why mov r7,#4 looks with hexeditor like this: hex 0407A0E3=bin 0000 0100 0000 0111 1010 0000 1110 0001 but If I look ARM instructions manual, it should look like 1111 0i10 0100 imm4 0imm3 Rd imm8 or 1111 0i00 010s 1111 0imm3 Rd imm8? And why there is in executable file 74 bytes before first command come? And lot bytes after commands and data? |
Re: [ASSEMBLER] How easy is it to get started asm coding on Maemo5?
@teroyk,
Normally executable programs have a format. Linux uses ELF. |
Re: [ASSEMBLER] How easy is it to get started asm coding on Maemo5?
Quote:
http://www.kernel.org/doc/man-pages/...an5/elf.5.html |
Re: [ASSEMBLER] How easy is it to get started asm coding on Maemo5?
Quote:
So there's no way a human could possibly beat a good compiler (and we have good compilers) in optimizing code. I also used to hand-optimize my programs (mostly 286 and 486). I stopped with the first Pentium. Quote:
Quote:
Most (all?) services and daemons running in your N900 are also open-source. Quote:
|
Re: [ASSEMBLER] How easy is it to get started asm coding on Maemo5?
+1
I also stopped doing hand-optimized assembler code with 486. With one exception - stupid M$ compiler did't optimize well for Duron's pipelines, so I hand-optimized some mmx code (video decoder), but that was just an exception. Using assembler makes absolutely no sense for general programming, especially now we have gcc 4.7.X. You may use assembler for some specific piece of code, but still, you won't beat compiler if you don't have a sh*tload of emulators, so you can trace pipelines, branches, caches, instruction dependencies, whatnot. @Reinob - "smooth transitions" falls in the same category as "ecosystem" if you ask me :D |
Re: [ASSEMBLER] How easy is it to get started asm coding on Maemo5?
S0urcerr0r, take a look at asm source of my elf:
https://dl.dropbox.com/u/28532483/lo...mpress.v.1.1.s And the same, but some updated at C: https://dl.dropbox.com/u/28532483/lo...ress.v.1.2.cpp Asm source can be compiled with: Code:
gcc logo_compress.v.1.1.s -o logo_compress.elf |
Re: [ASSEMBLER] How easy is it to get started asm coding on Maemo5?
ELF is actually ARMs executable and linkable file.
it's not just for linux, elfs can be loaded with symbian and with WinCE oses too. FASMARM is one great assembler and it's opesource so it can be tweaked up too. i think that writing includes for both maemo5 and maemo6 shouldn't be so hard. i will try to do some contribution for harmattan at least +1 for this thread |
Re: [ASSEMBLER] How easy is it to get started asm coding on Maemo5?
@wook_sf,
ELF existed before ARM. It's used by most Linux/Unix operating systems, and is architecture-independent, meaning it can be used for x86, ARM, or whatever. Originally it was used for x86. AFAIK Symbian used an ELF-like (or ELF-derived) format, but not quite ELF. I'm not aware of any Windows (CE or not) versions using ELF natively. Windows (including CE) uses PE (portable executable). |
Re: [ASSEMBLER] How easy is it to get started asm coding on Maemo5?
Quote:
ELF is officially supported by arm and that format is used for this processor. there was one really really good book about arm asm that explains lot about assembly, in my opinion far better for students than any other book i've read :D and i will try to link it here. about symbian - i wasn't talking about EPOC, but about ELF ;) basicly, elfs should be runnable on every arm machine :) |
Re: [ASSEMBLER] How easy is it to get started asm coding on Maemo5?
@wook_sf,
OK, this is getting off-topic, but: PE does not and cannot have an ELF header. PE is a different format than ELF. An ARM processor can run ARM instructions. The format of the executable file is of no concern for the processor, but for the operating system (dynamic linker), which needs to be able to identify the code sections so that they can be executed by the processor. Symbian uses the E32Image format. During compilation with the standard tools a PE or ELF executable is generated. This executable must be then converted to E32Image so that Symbian can use it. (see http://www.antonypranata.com/node/9). As for "ELFs should be runnable on every arm machine". The statement is obviously true, as long as the operating system can make sense of (use the) ELF format. That's like saying "ZIPs should be extractable on every ARM machine". Yes, but you need the unzip tool for that machine. Same as x86, mips or any other CPU architecture. Now we can go back on-topic :) .. unless, that is, you have some references supporting your assertions.. :) |
Re: [ASSEMBLER] How easy is it to get started asm coding on Maemo5?
you're not getting what i am trying to tell you.
zip format has nothing to do with instructions. i also did expressed something in wrong sense, but i'll try to explain it later |
Re: [ASSEMBLER] How easy is it to get started asm coding on Maemo5?
Quote:
My information source is: http://www.shervinemami.info/armAssembly.html |
Re: [ASSEMBLER] How easy is it to get started asm coding on Maemo5?
Quote:
|
All times are GMT. The time now is 17:33. |
vBulletin® Version 3.8.8