How to get the V2X project setup and ready to edit on your computer.
- Go to http://www.atmel.com/tools/ATMELSTUDIO.aspx Download the offline installer as a Guest if involvement is short. An account is not complicated if you will work on the project for some time. You will have to provide your email to get the installer (a link is sent).
- Install Atmel Studio 7 and the USB drivers. This will require running the installer with “run as administrator” privileges. Be sure to use “Advanced view” when the question is asked.
- GIT Clone the repo to a local project folder. https://github.com/PDXostc/rvi_v2x_firmware
git clone https://github.com/PDXostc/rvi_v2x_firmware
- Switch to Develop branch of git repo.
- Navigate into the repo \rvi_v2x_firmware\V2X_Firmware and open the V2X.cproj file. Atmel studio should launch
- Once the program launches, the ASF wizard should be displayed, select “V2X” from the project pull down.
- Click the Version tab. Uncheck the "Trigger Upgrade of modules" checkbox. A dialog will launch for confirmation. click "Yes"
- Downgrade the project by one ASF version to 3.33.0
- Check the "Trigger Upgrade of modules" checkbox then return the project to the current version, 3.34.1. Click "Upgrade"
- Follow the wizard,
- Click “Next”
- Select “No”
- Click "Finish"
- After the upgrade, there is no need to check the log. Click OK.
- Navigate back to the "Extension" tab. Verify these modules are contained in the project:
If not present, select corresponding module from the “Available modules” field in the left pane
- Generic board Suport (driver)
- Calendar Functionality (service)
- Delay routines (service)
- DMA Direct Memory Access (driver)
- GPIO General purpose Input/Output (service)
- Interrupt management (Common API) (driver)
- IOPORT General purpose I/O Service (service)
- IOPORT Input/Output Port Controller (driver)
- Memory Control Access Interface (service)
- NVM Non Volatile Memory (driver)
- NVM Non volatile memory access (CommonAPI) (Driver)
- No_extmem
- PMIC Programmable Multilevel Interrupt Controller (driver)
- PWM service using timer/counter (service)
- RTC Real Time Counter (driver)
- Sleep Controller driver (driver)
- Sleep manager (service)
- SPI Serial Peripheral Interface (driver)
- SPI Serial Periferal Interface Master (Common API) (service)
- Standard_spi
- Standard serial I/O (stdio) (driver)
- System Clock Control (sevice)
- TC Timer Counter (driver)
- USART Serial interface (service)
- USART Universal Synchronous/Asynchronous Reciever/Transmitter (driver)
- USB Device (service)
- cdc
- Click “Apply”, then “Ok” when a confirmation dialog appears.
- Save the project then Exit Atmel Studio
- A popup dialog will ask to save the project. Click Yes. Click Save. the application will exit.
- Navigate to \rvi_v2x_firmware\V2X_Firmware\src\V2X\OtherFiles.
- Follow the Readme.md (you will copy and overwrite some files)
- Launch the the V2X.atsln project file in \rvi_v2x_firmware\V2X_Firmware. Atmel Studio will start. The ASF wizard tab can be closed. The project should successfully build (F7).
- Connect the V2X hardware to dragon, power and USB
- Plug in the AVR Dragon programmer by USB (drivers should auto install)
- Use the menu Debug > V2X Properties… (bottom)
- Select the "Tool" Tab. If the dragon installed properly it should appear in the list. Select it, click save from the buttons along the top. Close the tab.
- Verify the V2X hardware is powered on. If the V2X has never been installed before you will need to hold the button down while any programming operations are performed.
- Select Device programming from the Tools menu.
- Select the Dragon as the device, select the ATxmega128A4U from the drop down, PDI interface, then click "Apply”
- Hold the V2X button down and click "device signature". If the chip is connected properly and operating the ID value 0x1E9746 will populate the Device Signature field and the Target Voltage field will also populate. If this test passes, close the window and move on. Failure discussion is beyond the scope of this document.
- Install the firmware to the V2X hardware using menu Debug -> Start Without Debugging. Again, you may need to hold the V2X button down to install the firmware.