Android Setup Guide: First-Time Subversion (SVN) Repository Tasks (part 3)
Posted: February 16, 2012 Filed under: NEZzen Leave a comment »First Time Android Project Setup and Commit for SVN Repository Trunk
Only one person in your team will have to create the “skeleton” of the Android project. They will then commit it to the SVN repository’s trunk. All the other members of the team will follow the next set of instructions in order to check-out (download) the skeleton to their computer.
- After following the previous set of instructions, you should see the “trunk” item in the “SVN Repositories” panel. It has a green up arrow as the icon to the left of it.
- Right click on the folder you are created the project in (“trunk”) and choose “Find/Check Out As…”
- The options you want are “Check out as a project configured using the New Project Wizard” and “Head revision”. Click “Finish” to complete this step.
- Select “Android > Android Project” in the next screen and continue on.
- Enter a project name and choose the option to “Create a new project in workspace”.
- Check the box to use “Google APIs” for platform 2.3.3 (or whatever version of Android you are targeting). Click on “Next” to proceed.
- Fill out the following page carefully! You namespace is probably “com.companyname.appname” or similar – you can make it whatever you’d like. Then click “Finish” to complete this step.
- A new project will be created in your “Package Explorer” panel!
- To upload this new project to the repository, right click on the project (not the SVN repo), and hover your mouse over “Team”. When the menu expands, click “Commit” and wait a little bit.
- Review the changes, enter a brief commit log, and click on “OK” – you’re done!
First Time Android Project Checkout from SVN Repository Trunk
After one member of your team has completed the steps in the previous section, you will need to download the skeleton project that they made and add it to your Eclipse workspace.
- After following the previous set of instructions, you should see the “trunk” item in the “SVN Repositories” panel. It has a green up arrow as the icon to the left of it.
- Right click on the folder your team leader created the project in (“trunk”) and choose “Find/Check Out As…”
- The options you want are “Check out as a project with the name specified” and “Head revision”. Click “Finish”.
- The name should already be filled in with your project’s name. Click “Finish” and wait a little bit.
- Switch over to the “Java” view by click in the >> icon in the top right of the window.
- If you notice a red error message in the console about the Android compiler compliance level not being correct, you will have to right click the newly checked out project (not the repo), mouse over “Android Tools”, and click on “Fix Project Properties” to resolve this issue.
- Congrats! You should now see your project’s source code in the “src/” folder!
Android Setup Guide: Installing and Configuring Eclipse’s Subversion (SVN) Plug-in (part 2)
Posted: February 15, 2012 Filed under: NEZzen Leave a comment »Adding the Subversion (SVN) Plug-in to Eclipse
You will most likely want to use a version control system for managing the source code in your project. This set of instructions will step you through adding the Subversion plug-in to your existing Eclipse installation.
- Start up the Eclipse IDE if you haven’t already done so.
- Go to the “Help” menu again and select “Install New Software…” from the drop down.
- In the “Work With” drop down, select the “Indigo” source (or whatever is the name of your release).
- The list below will populate. Scroll up and expand the “Collaboration” section.
- Place a check in the selection box next to “Subversion SVN Team Provider (Incubation)”.
- Click “Next” and then click “Next” again at the confirmation page.
- Accept the license agreement. Now click “Finish”. Wait for a bit while the plug-in is downloaded and installed.
- Restart Eclipse when you are prompted to do so.
- Go to the “Window” menu and select “Open Perspective” from the drop down. Then click “Other…”
- Pick “SVN Repository Exploring” from the list and click on “OK”.
- Place a checkbox next to “SVN Kit 1.3.5” in the next window. Then click “Finish”.
- Click “Next” and then click “Next” again at the confirmation page.
- Accept the license agreement. Now click “Finish”. Wait for a bit while the plug-in is downloaded and installed.
- Restart Eclipse when you are prompted to do so.
- You should now have a Subversion view available in addition to the normal Java view. Look in the top-right hand corner of the Eclipse window. You will see the current view, along with a small >> button to select other views.
Android Setup Guide: Installing the SDK and ADT Plug-in (part 1)
Posted: February 14, 2012 Filed under: NEZzen Leave a comment »Installing the Android SDK
Continuing from the previous post I made regarding Eclipse, we will now download the standalone Android tools from Google. This is required to do Android development.
- Go to http://developer.android.com/sdk/index.html.
- Download the Starter Package installer, “installer-r16-windows.exe”.
- Run the installer executable and follow the prompts. You will not need the installer anymore after this.
- At the end, you will be prompted to start the Android SDK Manager. Do this.
- The package selection screen will load. Ensure the following items and all their sub-items are completely checked:
- Tools
- Android 2.3.3 (API 10) (as of writing, this is the most widely used version of Android)
- Google USB Driver Package (found under “Extras”)
- Android Support Package (found under “Extras”)
- Click on the button “Install packages…” in the lower right of the window.
- Click on “Accept All” for the license agreement. Then click “Install” and wait a while for it to finish!
- Note: If for some reason you get prompted to enter a username and password, you probably selected a package that requires authentication to download. In this case you can just click “Cancel” and get on with your life.
Adding the Android Development Tools Plug-in to Eclipse
The Android Development Tools (ADT) plug-in allows Eclipse to integrate with the Android SDK and allows you to easily create, build, and debug Android projects. These instructions are copied almost directly from http://developer.android.com/sdk/eclipse-adt.html#installing.
- Start up Eclipse. (If this is your first time running Eclipse, you will be prompted to set a workspace directory – just use the default unless you have a specific reason to choose otherwise.)
- Click on the “Help” menu. Then select “Install New Software…” from the drop-down menu.
- Click “Add” in the top right corner.
- Under “Location” enter this exact URL: https://dl-ssl.google.com/android/eclipse/
- In the Available Software dialog, select the checkbox next to “Developer Tools” and click “Next”.
- In the next window, you’ll see a list of the 4 tools to be downloaded. Click “Next”.
- Read and accept the license agreements, then click “Finish”. Now you must wait.
- When the installation completes, restart Eclipse as prompted.
- After the restart, the ADT setup window will pop up. Don’t bother to have it download the SDKs all over again, just point it at the folder you installed to previously. By default this is C:\Program Files\Android\android-sdk.
- You can test that you have succeeded by going to the “File” menu and selecting “New” and then “Project”. If you see “Android > Android Project” in the list then you’re good to go make your first Android project in Eclipse!
Installing the Java Development Kit (JDK) and Eclipse IDE on your Windows computer
Posted: February 13, 2012 Filed under: NEZzen 2 Comments »Installing the Java Development Kit (JDK)
You will need this installed before you can do anything else. If you already have the JDK installed (you can check by going to the Windows Control Panel and opening the “Programs & Features” list), you can skip this step.
- Go to http://www.oracle.com/technetwork/java/javase/downloads/index.html.
- Scroll down to “Java SE 6 Update 31” and click the red download button under “JDK”.
- Accept the license agreement and download the file “jdk-6u31-windows-i586.exe” (for 32-bit Windows) or “jdk-6u31-windows-x64.exe” (for 64-bit Windows).
- Run the installer executable and follow the prompts, accepting default options.
- Installation is now complete! You do not need to register. You do not need the installer after this step.
Installing the Eclipse IDE
After you’ve installed the JDK, you will need to install Eclipse. If you already have a suitable version of Eclipse installed, you can skip this step.
- Go to http://www.eclipse.org/downloads/.
- Download “Eclipse Classic 3.7.1” for Windows and pick either 32-bit or 64-bit depending on the version of the JDK you have installed.
- Extract the archive “eclipse-SDK-3.7.1-win32*.zip” that you just downloaded to a folder of your choice. You will not need the archive anymore after this step.
- Eclipse is now installed! You can run it by going to the folder and launching “eclipse.exe”.
Defeating “TrustedInstaller” with a Command Line Snippet
Posted: January 6, 2012 Filed under: NEZzen Leave a comment »Here’s a little piece of code to recursively take ownership of a folder protected by “TrustedInstaller” on Windows 7.
takeown /f %1 /r /d y && icacls %1 /grant Administrators:F /t
Save this line in a .CMD file and call it with the directory you want to use it on as the first parameter. You will need to have elevated (Administrator) permission to do this properly.
FPGA/VHDL Video Tutorial Series
Posted: October 23, 2011 Filed under: NEZzen Leave a comment »I’ve recently started working on an introductory level video tutorial series on digital design using VHDL and FPGAs. I have been uploading my videos to YouTube as they’re completed. I have plans to produce 11 videos in total. As I complete each video, I will update this post with the relevant links.
Read the rest of this entry »
NEZbox: External Status Meter for Computers
Posted: February 1, 2011 Filed under: NEZzen Leave a comment »In my opinion, one of the most useful (not to mention cool) computer mods is the addition of a character LCD to the front of a tower. On and off I’ve considered adding a small status display such as those from CrystalFontz to an empty 5.25″ bay on my computer and talking to it using a program such as the Linux LCDproc or Windows LCD Smartie, but I’ve always avoided it due to price and the idea that putting an LCD on my tower seems to be bad in terms of visibility/placement. Because of this, I decided to look into external solutions such as the $100 Lilliput Mini USB Monitor (feature overkill), or the $50 Pertelian External LCD (grossly overpriced) sold by ThinkGeek. These device have been in the back of my mind for quite some time, and it wasn’t until I stumbled across a very cool mod interfacing an analog VU meter with a desktop computer via microcontroller that I decided to proceed with building my own external status device. Thus, the NEZbox was born.
The NEZbox is a simple ATmega168-based external status meter. I put it together for about $25. The materials used include a Radioshack black plastic project box, a piece of protoboard, an ATmega168 microprocessor, 14.7456MHz crystal (not 16MHz, better for serial com), a USB-to-serial adapter (UART) PL2303 cable, a 4-line LED-backlit character LCD, a 50uA analog meter, a temperature sensor, and some wire and resistors. Later I discovered that my USB ports always stay powered even when my computer is off, so I added an small ON/OFF switch to the back. A Dremel was used to cut out slots for the meter and LCD, and epoxy glue holds them in place.
The PWM/LCD/serial code running on the ATmega168 is simple embedded C. Under Linux, a small shell script sends commands every five seconds to /dev/ttyUSB telling the MCU to write to the LCD or move the analog meter’s needle. There is also a command to query the temperature sensor. Likewise, under Windows this is accomplished with a small C# program. Overall the results are pleasing to me for this simple and inexpensive project.
Read the rest of this entry »
Helpful Arduino-as-ISP Commands
Posted: October 6, 2010 Filed under: NEZzen Leave a comment »So you’re using the Mega-ISP sketch to make your Arduino act as an ISP, which you can then use with AVRDUDE. You can do much more than just burn a bootloader, you can write programs to ATmega168 chips that take advantage of the whole 16KB Flash area (no 2KB bootloader)!
First, be sure to read through the ArduinoISP tutorial to get the circuit wired up correctly. You may also with to consult this ATmega168 pin-mapping diagram.
Here are some helpful commands and settings:
To program your fuse bytes first do:
avrdude -v -v -patmega168 -cstk500v1 -P/dev/cu.usbserial-A600cnPP -b19200 -e -Ulfuse:w:0xE2:m -Uhfuse:w:0xD5:m -Uefuse:w:0xF8:m
I highly suggest to think about your fuse bits before writing them to the chip. You can use an online fuse bit calculator such as this one.
From a post on the Avrfreaks forum:
Note in the ATmega168 datasheet, page 288, that in the extended fuse byte, bits 7, 6, 5, 4, and 3 are all unused. Avrdude knows this, and it intentionally masks those bits off when it reads the extended fuse byte. [...] If I recall correctly, the problem is that avrdude applies the mask at the end of the programming session when it verifies the success of safemode, but not beforehand when it reads the initial value, or something like that.
Arduino’s “unlock” lock bits are: (not typically needed?)
-Ulock:w:0x3F:m
Then, finally, to program the flash memory with your code do:
avrdude -v -v -patmega168 -cstk500v1 -P/dev/cu.usbserial-A600cnPP -b19200 -e -Uflash:w:blink_1MHz.hex
The code in blink_1MHz.hex is from this Sparkfun introductory tutorial.
Texas Instruments F28335 DSP C2000-series Assembler Notes
Posted: October 4, 2010 Filed under: NEZzen Leave a comment »Memory Sections
.text executable code RAML1 (internal DSP memory)
starting address = 0x9000, 4K Words
.data initialized data RAML2 (internal DSP memory)
starting address = 0xA000, 4K Words
.bss reserved space for uninitialized data
starting address = 0xB000
CPU Control Registers
ACC Accumulator (32 bits) => AH (high 16 bits) and AL (low 16 bits) XAR0 Auxiliary Register0 (32 bits) => AR0H (high 16 bits) and AR0 (low 16 bits) ....up through... XAR7 Auxiliary Register7 (32 bits) => AR7H (high 16 bits) and AR7 (low 16 bits) XT Multiplicand Register (32 bits) => T (high 16 bits) and TL (low 16 bits) P Product Register (32 bits) => PH (high 16 bits) and PL (low 16 bits) PC Program Counter (22 bits) SP Stack Pointer (16 bits) DP Data Page Register (16 bits) ST1,ST0 Status Registers (flags)
This is the Unix philosophy
Posted: September 2, 2010 Filed under: NEZzen Leave a comment »Write programs that do one thing and do it well.
Write programs to work together.
Write programs to handle text streams,
because that is a universal interface.
— Doug McIlroy
Read the rest of this entry »