/opt/ros/diamondback/stacks/ethzasl_aseba/asebaros/aseba/svn/targets/dspic33/skel.c File Reference

#include <string.h>
#include <can/can.h>
#include <dma/dma.h>
#include <gpio/gpio.h>
#include <types/types.h>
#include <error/error.h>
#include <flash/flash.h>
#include <transport/can/can-net.h>
#include <vm/natives.h>
#include <vm/vm.h>
#include <common/consts.h>
#include <transport/buffer/vm-buffer.h>
#include "skel.h"
#include <common/types.h>
#include <skel-user.h>
#include <skel-user.c>
Include dependency graph for skel.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define COMPILATION_ASSERT(e)   do { enum { assert_static__ = 1/(e) };} while(0)
#define FUID3   0xF80016
#define NUMBER_OF_CHUNK   26
#define PAGE_PER_CHUNK   ((VM_BYTECODE_SIZE*2+3 + INSTRUCTIONS_PER_PAGE*3 - 1) / (INSTRUCTIONS_PER_PAGE*3))

Functions

void __attribute ((noreturn))
unsigned char __bootloader[INSTRUCTIONS_PER_PAGE *2 *2] __attribute ((space(prog), section(".boot"), noload, address(0x15800-0x800)))
static __attribute ((far))
static void __attribute__ ((noreturn))
unsigned char
aseba_settings_flash[INSTRUCTIONS_PER_PAGE *2] 
__attribute__ ((space(prog), section(".aseba_settings"), noload, address(0x15800-0x800-0x400)))
unsigned char aseba_flash1[PAGE_PER_CHUNK][INSTRUCTIONS_PER_PAGE *2] __attribute__ ((space(prog), aligned(INSTRUCTIONS_PER_PAGE *2), section(".aseba_bytecode")))
unsigned char aseba_flash[PAGE_PER_CHUNK][INSTRUCTIONS_PER_PAGE *2] __attribute__ ((space(prog), aligned(INSTRUCTIONS_PER_PAGE *2), section(".aseba_bytecode"), address(0x15800-0x800-0x400-NUMBER_OF_CHUNK *0x400L *PAGE_PER_CHUNK)))
struct private_settings __attribute__ ((aligned(2)))
const
AsebaNativeFunctionDescription
*const * 
AsebaGetNativeFunctionsDescriptions (AsebaVMState *vm)
const AsebaVMDescriptionAsebaGetVMDescription (AsebaVMState *vm)
void AsebaIdle (void)
static void AsebaNative__system_settings_flash (AsebaVMState *vm)
static void AsebaNative__system_settings_read (AsebaVMState *vm)
static void AsebaNative__system_settings_write (AsebaVMState *vm)
void AsebaNativeFunction (AsebaVMState *vm, uint16 id)
void AsebaPutVmToSleep (AsebaVMState *vm)
void AsebaResetIntoBootloader (AsebaVMState *vm)
uint16 AsebaShouldDropPacket (uint16 source, const uint8 *data)
void AsebaWriteBytecode (AsebaVMState *vm)
void init_aseba_and_can (void)
static void load_code_from_flash (AsebaVMState *vm)
int load_settings_from_flash (void)
static void received_packet_dropped (void)
static void sent_packet_dropped (void)
static unsigned int ui2str (char *str, unsigned int value)
static unsigned int ui2strhex (char *str, unsigned int id)

Variables

static const unsigned int _magic_ [8] = {0xDE, 0xAD, 0xCA, 0xFE, 0xBE, 0xEF, 0x04, 0x02}
unsigned long aseba_flash_ptr
unsigned long aseba_settings_ptr
static
AsebaNativeFunctionDescription 
AsebaNativeDescription__system_reboot
static
AsebaNativeFunctionDescription 
AsebaNativeDescription__system_settings_flash
static
AsebaNativeFunctionDescription 
AsebaNativeDescription__system_settings_read
static
AsebaNativeFunctionDescription 
AsebaNativeDescription__system_settings_write
unsigned int events_flags = 0

Define Documentation

#define COMPILATION_ASSERT (  )     do { enum { assert_static__ = 1/(e) };} while(0)
#define FUID3   0xF80016

Definition at line 483 of file skel.c.

#define NUMBER_OF_CHUNK   26

Definition at line 218 of file skel.c.

#define PAGE_PER_CHUNK   ((VM_BYTECODE_SIZE*2+3 + INSTRUCTIONS_PER_PAGE*3 - 1) / (INSTRUCTIONS_PER_PAGE*3))

Definition at line 207 of file skel.c.


Function Documentation

void __attribute ( (noreturn)   ) 

Definition at line 513 of file skel.c.

unsigned char __bootloader [INSTRUCTIONS_PER_PAGE * 2 * 2] __attribute ( (space(prog), section(".boot"), noload, address(0x15800-0x800))   ) 
static __attribute ( (far)   )  [static]

Definition at line 138 of file skel.c.

static void __attribute__ ( (noreturn)   )  [static]

Definition at line 461 of file skel.c.

unsigned char aseba_settings_flash [INSTRUCTIONS_PER_PAGE * 2] __attribute__ ( (space(prog), section(".aseba_settings"), noload, address(0x15800-0x800-0x400))   ) 
unsigned char aseba_flash1 [PAGE_PER_CHUNK][INSTRUCTIONS_PER_PAGE * 2] __attribute__ ( (space(prog), aligned(INSTRUCTIONS_PER_PAGE *2), section(".aseba_bytecode"))   ) 
unsigned char aseba_flash [PAGE_PER_CHUNK][INSTRUCTIONS_PER_PAGE * 2] __attribute__ ( (space(prog), aligned(INSTRUCTIONS_PER_PAGE *2), section(".aseba_bytecode"), address(0x15800-0x800-0x400-NUMBER_OF_CHUNK *0x400L *PAGE_PER_CHUNK))   ) 
struct private_settings __attribute__ ( (aligned(2))   )  [read]

Definition at line 121 of file skel.c.

static void AsebaNative__system_settings_flash ( AsebaVMState vm  )  [static]

Definition at line 328 of file skel.c.

static void AsebaNative__system_settings_read ( AsebaVMState vm  )  [static]

Definition at line 68 of file skel.c.

static void AsebaNative__system_settings_write ( AsebaVMState vm  )  [static]

Definition at line 90 of file skel.c.

void init_aseba_and_can ( void   ) 

Definition at line 485 of file skel.c.

static void load_code_from_flash ( AsebaVMState vm  )  [static]

Definition at line 359 of file skel.c.

int load_settings_from_flash ( void   ) 

Definition at line 384 of file skel.c.

static void received_packet_dropped ( void   )  [static]

Definition at line 180 of file skel.c.

static void sent_packet_dropped ( void   )  [static]

Definition at line 185 of file skel.c.

static unsigned int ui2str ( char *  str,
unsigned int  value 
) [static]

Definition at line 421 of file skel.c.

static unsigned int ui2strhex ( char *  str,
unsigned int  id 
) [static]

Definition at line 440 of file skel.c.


Variable Documentation

const unsigned int _magic_[8] = {0xDE, 0xAD, 0xCA, 0xFE, 0xBE, 0xEF, 0x04, 0x02} [static]

Definition at line 327 of file skel.c.

unsigned long aseba_flash_ptr

Definition at line 254 of file skel.c.

unsigned long aseba_settings_ptr

Definition at line 255 of file skel.c.

Initial value:
{
        "_system.reboot",
        "Reboot the microcontroller",
        {
                { 0, 0 }
        }
}

Definition at line 44 of file skel.c.

Initial value:
{
        "_system.settings.flash",
        "Write the settings into flash",
        {
                { 0, 0 }
        }
}

Definition at line 101 of file skel.c.

Initial value:
{
        "_system.settings.read",
        "Read a setting",
        {
                { 1, "address"},
                { 1, "value"},
                { 0, 0 }
        }
}

Definition at line 57 of file skel.c.

Initial value:
{
        "_system.settings.write",
        "Write a setting",
        {
                { 1, "address"},
                { 1, "value"},
                { 0, 0 }
        }
}

Definition at line 79 of file skel.c.

unsigned int events_flags = 0

Definition at line 117 of file skel.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


asebaros
Author(s): $author
autogenerated on Mon Sep 5 08:42:00 2011