Defines | Functions | Variables
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 <skel-user.c>
Include dependency graph for skel.c:

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

static __attribute ((far))
unsigned char __bootloader[INSTRUCTIONS_PER_PAGE *2 *2] __attribute ((space(prog), section(".boot"), noload, address(0x15800-0x800)))
void __attribute ((noreturn))
struct private_settings __attribute__ ((aligned(2)))
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)))
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_settings_flash[INSTRUCTIONS_PER_PAGE *2] 
__attribute__ ((space(prog), section(".aseba_settings"), noload, address(0x15800-0x800-0x400)))
static void __attribute__ ((noreturn))
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 (   e)    do { enum { assert_static__ = 1/(e) };} while(0)
#define FUID3   0xF80016

Definition at line 481 of file skel.c.

#define NUMBER_OF_CHUNK   26

Definition at line 216 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 205 of file skel.c.


Function Documentation

static __attribute ( (far)  ) [static]

Definition at line 136 of file skel.c.

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

Definition at line 511 of file skel.c.

struct private_settings __attribute__ ( (aligned(2))  ) [read]

Definition at line 119 of file skel.c.

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))  )
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_settings_flash [INSTRUCTIONS_PER_PAGE * 2] __attribute__ ( (space(prog), section(".aseba_settings"), noload, address(0x15800-0x800-0x400))  )
static void __attribute__ ( (noreturn)  ) [static]

Definition at line 459 of file skel.c.

static void AsebaNative__system_settings_flash ( AsebaVMState vm) [static]

Definition at line 326 of file skel.c.

static void AsebaNative__system_settings_read ( AsebaVMState vm) [static]

Definition at line 66 of file skel.c.

static void AsebaNative__system_settings_write ( AsebaVMState vm) [static]

Definition at line 88 of file skel.c.

void init_aseba_and_can ( void  )

Definition at line 483 of file skel.c.

static void load_code_from_flash ( AsebaVMState vm) [static]

Definition at line 357 of file skel.c.

int load_settings_from_flash ( void  )

Definition at line 382 of file skel.c.

static void received_packet_dropped ( void  ) [static]

Definition at line 178 of file skel.c.

static void sent_packet_dropped ( void  ) [static]

Definition at line 183 of file skel.c.

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

Definition at line 419 of file skel.c.

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

Definition at line 438 of file skel.c.


Variable Documentation

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

Definition at line 325 of file skel.c.

unsigned long aseba_flash_ptr

Definition at line 252 of file skel.c.

unsigned long aseba_settings_ptr

Definition at line 253 of file skel.c.

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

Definition at line 42 of file skel.c.

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

Definition at line 99 of file skel.c.

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

Definition at line 55 of file skel.c.

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

Definition at line 77 of file skel.c.

unsigned int events_flags = 0

Definition at line 115 of file skel.c.



aseba
Author(s): Stéphane Magnenat
autogenerated on Thu Jan 2 2014 11:17:17