Makefile now ok with the ersky9x board
This commit is contained in:
@@ -0,0 +1,144 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 2011 by Michael Fischer. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the author nor the names of its contributors may
|
||||
* be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
*****************************************************************************
|
||||
* History:
|
||||
*
|
||||
* 22.05.2011 mifi First Version
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
/*
|
||||
* In this linker script there is no heap available.
|
||||
* The stack start at the end of the ram segment.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Take a look in the "The GNU linker" manual, here you get
|
||||
* the following information about the "MEMORY":
|
||||
*
|
||||
* "The MEMORY command describes the location and size of
|
||||
* blocks of memory in the target."
|
||||
*/
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x00400000, LENGTH = 128K
|
||||
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 32K
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* And the "SECTION" is used for:
|
||||
*
|
||||
* "The SECTIONS command tells the linker how to map input
|
||||
* sections into output sections, and how to place the output
|
||||
* sections in memory.
|
||||
*/
|
||||
SECTIONS
|
||||
{
|
||||
|
||||
/*
|
||||
* The ".text" section is used for the code, and
|
||||
* read only (.rodata) data. Even the vectors (.vectors)
|
||||
* MUST be saved at the start of this section.
|
||||
*/
|
||||
.text :
|
||||
{
|
||||
_stext = .; /* Provide the name for the start of this section */
|
||||
|
||||
CREATE_OBJECT_SYMBOLS
|
||||
KEEP(*(.vectors))
|
||||
|
||||
*(.text)
|
||||
*(.text.*)
|
||||
|
||||
. = ALIGN(4); /* Align the start of the exidx part */
|
||||
*(.ARM.exidx)
|
||||
*(.ARM.exidx.*)
|
||||
|
||||
. = ALIGN(4); /* Align the start of the rodata part */
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
|
||||
. = ALIGN(4); /* Align the end of the section */
|
||||
} > FLASH = 0
|
||||
_etext = .; /* Provide the name for the end of this section */
|
||||
|
||||
|
||||
/*
|
||||
* The ".data" section is used for initialized data
|
||||
* and for functions (.fastrun) which should be copied
|
||||
* from flash to ram. This functions will later be
|
||||
* executed from ram instead of flash.
|
||||
*/
|
||||
.data : AT (_etext)
|
||||
{
|
||||
. = ALIGN(4); /* Align the start of the section */
|
||||
_sdata = .; /* Provide the name for the start of this section */
|
||||
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
|
||||
. = ALIGN(4); /* Align the start of the fastrun part */
|
||||
*(.fastrun)
|
||||
*(.fastrun.*)
|
||||
|
||||
. = ALIGN(4); /* Align the end of the section */
|
||||
} > RAM
|
||||
_edata = .; /* Provide the name for the end of this section */
|
||||
|
||||
|
||||
/*
|
||||
* The ".bss" section is used for uninitialized data.
|
||||
* This section will be cleared by the startup code.
|
||||
*/
|
||||
.bss :
|
||||
{
|
||||
. = ALIGN(4); /* Align the start of the section */
|
||||
_sbss = .; /* Provide the name for the start of this section */
|
||||
|
||||
*(.bss)
|
||||
*(.bss.*)
|
||||
|
||||
. = ALIGN(4); /* Align the end of the section */
|
||||
} > RAM
|
||||
_ebss = .; /* Provide the name for the end of this section */
|
||||
|
||||
|
||||
/*
|
||||
* The ".stack" section is our stack.
|
||||
* Here this section starts at the end of the ram segment.
|
||||
*/
|
||||
_estack = ORIGIN(RAM) + LENGTH(RAM);
|
||||
|
||||
}
|
||||
|
||||
/*** EOF **/
|
||||
|
||||
+22
-2
@@ -91,6 +91,20 @@ uint16_t Sine_values64[] =
|
||||
633, 779, 936,1105,1282,1467,1657,1851
|
||||
} ;
|
||||
|
||||
const uint16_t PianoTones[] =
|
||||
{
|
||||
28, 29, 31, 33, 35, 37, 39, 41, 44, 46,
|
||||
49, 52, 55, 58, 62, 65, 69, 73, 78, 82,
|
||||
87, 92, 98, 104, 110, 117, 123, 131, 139, 147,
|
||||
156, 165, 175, 185, 196, 208, 220, 233, 247, 262,
|
||||
277, 294, 311, 330, 349, 370, 392, 415, 440, 466,
|
||||
494, 523, 554, 587, 622, 659, 698, 740, 784, 831,
|
||||
880, 932, 988, 1047, 1109, 1175, 1245, 1319, 1397, 1480,
|
||||
1568, 1661, 1760, 1865, 1976, 2093, 2217, 2349, 2489, 2637,
|
||||
2794, 2960, 3136, 3322, 3520 ,3729, 3951, 4186
|
||||
} ;
|
||||
|
||||
|
||||
// Sound routines
|
||||
|
||||
void start_sound()
|
||||
@@ -244,6 +258,14 @@ void end_sound()
|
||||
PMC->PMC_PCER0 &= ~0x40000000L ; // Disable peripheral clock to DAC
|
||||
}
|
||||
|
||||
|
||||
void playTone( uint32_t frequency, uint32_t time )
|
||||
{
|
||||
set_frequency( frequency ) ;
|
||||
tone_start( time ) ;
|
||||
}
|
||||
|
||||
|
||||
// Time is in milliseconds
|
||||
void tone_start( register uint32_t time )
|
||||
{
|
||||
@@ -340,5 +362,3 @@ void audioDefevent(uint8_t e)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+1
-25
@@ -33,31 +33,6 @@
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
/* make sure the defines below always go in numeric order */
|
||||
#define AUDIO_TADA (0)
|
||||
#define AUDIO_WARNING1 (1)
|
||||
#define AUDIO_WARNING2 (2)
|
||||
#define AUDIO_WARNING3 (3)
|
||||
#define AUDIO_ERROR (4)
|
||||
#define AUDIO_KEYPAD_UP (5)
|
||||
#define AUDIO_KEYPAD_DOWN (6)
|
||||
#define AUDIO_TRIM_MOVE (7)
|
||||
#define AUDIO_TRIM_MIDDLE (8)
|
||||
#define AUDIO_MENUS (9)
|
||||
#define AUDIO_POT_STICK_MIDDLE (10)
|
||||
#define AUDIO_MIX_WARNING_1 (11)
|
||||
#define AUDIO_MIX_WARNING_2 (12)
|
||||
#define AUDIO_MIX_WARNING_3 (13)
|
||||
#define AUDIO_TIMER_30 (14)
|
||||
#define AUDIO_TIMER_20 (15)
|
||||
#define AUDIO_TIMER_10 (16)
|
||||
#define AUDIO_TIMER_LT3 (17)
|
||||
#define AUDIO_INACTIVITY (18)
|
||||
#define AUDIO_TX_BATTERY_LOW (19)
|
||||
|
||||
|
||||
#define NUM_VOL_LEVELS 24
|
||||
|
||||
extern volatile uint8_t Buzzer_count ;
|
||||
@@ -72,6 +47,7 @@ extern void start_timer1( void ) ;
|
||||
extern void init_dac( void ) ;
|
||||
extern "C" void DAC_IRQHandler( void ) ;
|
||||
extern void end_sound( void ) ;
|
||||
extern void playTone( uint32_t frequency, uint32_t time ) ;
|
||||
extern void tone_start( register uint32_t time ) ;
|
||||
extern void tone_stop( void ) ;
|
||||
extern void init_twi( void ) ;
|
||||
|
||||
@@ -177,18 +177,18 @@ void PIOC_IRQHandler (void) { while(1); }
|
||||
void USART0_IRQHandler (void) { while(1); }
|
||||
void USART1_IRQHandler (void) { while(1); }
|
||||
void MCI_IRQHandler (void) { while(1); }
|
||||
void TWI0_IRQHandler (void) { while(1); }
|
||||
// void TWI0_IRQHandler (void) { while(1); }
|
||||
void TWI1_IRQHandler (void) { while(1); }
|
||||
void SPI_IRQHandler (void) { while(1); }
|
||||
void SSC_IRQHandler (void) { while(1); }
|
||||
void TC0_IRQHandler (void) { while(1); }
|
||||
void TC1_IRQHandler (void) { while(1); }
|
||||
void TC2_IRQHandler (void) { while(1); }
|
||||
// void TC2_IRQHandler (void) { while(1); }
|
||||
void TC3_IRQHandler (void) { while(1); }
|
||||
void TC4_IRQHandler (void) { while(1); }
|
||||
void TC5_IRQHandler (void) { while(1); }
|
||||
void ADC_IRQHandler (void) { while(1); }
|
||||
void DAC_IRQHandler (void) { while(1); }
|
||||
// void DAC_IRQHandler (void) { while(1); }
|
||||
void PWM_IRQHandler (void) { while(1); }
|
||||
void CRCCU_IRQHandler (void) { while(1); }
|
||||
void ACC_IRQHandler (void) { while(1); }
|
||||
|
||||
Reference in New Issue
Block a user