Skip to content
Snippets Groups Projects
Commit dfae1ba9 authored by patacongo's avatar patacongo
Browse files

Correcting banked vs. non-banked issues (there are more)

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3320 42af7a65-404d-4744-a932-0658087f49c3
parent 80251532
No related branches found
No related tags found
No related merge requests found
############################################################################
# arch/hc/src/Makefile
#
# Copyright (C) 2009 Gregory Nutt. All rights reserved.
# Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
#
# Redistribution and use in source and binary forms, with or without
......
This diff is collapsed.
......@@ -52,6 +52,14 @@
* Private Definitions
**************************************************************************/
#ifdef CONFIG_HCS12_NONBANKED
# define CALL jsr
# define RETURN rts
#else
# define CALL call
# define RETURN rtc
#endif
/* Select SCI parameters for the selected console */
#if defined(CONFIG_SCI0_SERIAL_CONSOLE)
......@@ -166,7 +174,7 @@ up_lowsetup:
#endif /* CONFIG_HCS12_SERIALMON */
#endif /* HAVE_SERIAL_CONSOLE */
rts
RETURN
.size up_lowsetup, . - up_lowsetup
/**************************************************************************
......@@ -207,11 +215,11 @@ up_lowputc:
#endif /* HCS12_CONSOLE_BITS == 9 */
stab (HCS12_CONSOLE_BASE+HCS12_SCI_DRL_OFFSET)
rts
RETURN
#endif /* !CONFIG_HCS12_SERIALMON */
#else
rts
RETURN
#endif /* HAVE_SERIAL_CONSOLE */
.size up_lowputc, . - up_lowputc
.end
......@@ -48,6 +48,14 @@
* Private Definitions
**************************************************************************/
#ifdef CONFIG_HCS12_NONBANKED
# define CALL jsr
# define RETURN rts
#else
# define CALL call
# define RETURN rtc
#endif
/**************************************************************************
* Private Types
**************************************************************************/
......@@ -176,6 +184,6 @@ up_saveusercontext:
#endif
clra
clrb
rts
RETURN
.size up_saveusercontext, . - up_saveusercontext
.end
......@@ -51,6 +51,14 @@
* Private Definitions
****************************************************************************/
#ifdef CONFIG_HCS12_NONBANKED
# define CALL jsr
# define RETURN rts
#else
# define CALL call
# define RETURN rtc
#endif
#define INITRG_REG (MMC_INITRG_REG(HCS12_REG_BASE))
#define INITRM_MAP (MMC_INITRM_RAM(HCS12_SRAM_BASE)|MMC_INITRM_RAMHAL)
#define INITEE_EE (MMC_INITEE_EE(HCS12_EEPROM_BASE)|MMC_INITEE_EEON)
......@@ -79,11 +87,7 @@
#ifdef CONFIG_HCS12_SERIALMON
jsr #PutChar
#else
#ifdef CONFIG_HCS12_NONBANKED
jsr up_lowputc
#else
call up_lowputc
#endif
CALL up_lowputc
#endif
#endif
.endm
......@@ -107,8 +111,8 @@
movb #INITRM_MAP, HCS12_MMC_INITRM /* Set RAM position to 0x2000-0x3fff */
movb #INITEE_EE, HCS12_MMC_INITEE /* Set EEPROM position to 0x0800 */
/* In the non-banked mode, PPAGE is set to 0x3d to create a contiguous, 48Kb
* .text address space.
/* In the non-banked mode, PPAGE is set to 0x3d to create a (non-contiguous),
* fixed, 48Kb .text address space.
*/
#ifdef CONFIG_HCS12_NONBANKED
......@@ -176,11 +180,7 @@ __start:
/* Perform early, low-level initialization */
#ifndef CONFIG_HCS12_SERIALMON
#ifdef CONFIG_HCS12_NONBANKED
jsr up_lowsetup
#else
call up_lowsetup
#endif
CALL up_lowsetup
#endif
showprogress 'A'
......@@ -219,21 +219,13 @@ __start:
/* Perform early board-level initialization */
#ifdef CONFIG_HCS12_NONBANKED
jsr hcs12_boardinitialize
#else
call hcs12_boardinitialize
#endif
CALL hcs12_boardinitialize
showprogress 'D'
/* Now, start the OS */
showprogress '\n'
#ifdef CONFIG_HCS12_NONBANKED
jsr os_start
#else
call os_start
#endif
CALL os_start
bra __start
/* Variables:
......@@ -259,7 +251,6 @@ __start:
.hword _edata
.size __start, .-__start
/************************************************************************************
* .rodata
************************************************************************************/
......
......@@ -45,6 +45,14 @@
* Pre-processor Definitions
************************************************************************************/
#ifdef CONFIG_HCS12_NONBANKED
# define CALL jsr
# define RETURN rts
#else
# define CALL call
# define RETURN rtc
#endif
/************************************************************************************
* Global Symbols
************************************************************************************/
......@@ -161,7 +169,7 @@ hcs12_vectors:
* .text
************************************************************************************/
.text
.section nonbanked, "x"
.type handlers, function
handlers:
......@@ -301,7 +309,7 @@ vcommon:
/* Recover the IRQ number and call up_doirq() */
ldab .Lbsave
bsr up_doirq
CALL up_doirq
leas 2, sp
/* Check if the return value in d is the same as regs parameter passed in the TOS */
......
/****************************************************************************
* drivers/net/skeleton.c
*
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment