Fixes to get clean i.MXADS build
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@3533 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
parent
2a114bcb72
commit
a57cc2353f
|
@ -142,19 +142,19 @@ static void *sender_thread(void *arg)
|
|||
|
||||
for (i = 0; i < TEST_SEND_NMSGS; i++)
|
||||
{
|
||||
struct timespec time;
|
||||
status = clock_gettime(CLOCK_REALTIME, &time);
|
||||
struct timespec ts;
|
||||
status = clock_gettime(CLOCK_REALTIME, &ts);
|
||||
if (status != 0)
|
||||
{
|
||||
printf("sender_thread: ERROR clock_gettime failed\n");
|
||||
}
|
||||
time.tv_sec += 5;
|
||||
ts.tv_sec += 5;
|
||||
|
||||
/* The first TEST_SEND_NMSGS-1 send should succeed. The last
|
||||
* one should fail with errno == ETIMEDOUT
|
||||
*/
|
||||
|
||||
status = mq_timedsend(mqfd, msg_buffer, TEST_MSGLEN, 42, &time);
|
||||
status = mq_timedsend(mqfd, msg_buffer, TEST_MSGLEN, 42, &ts);
|
||||
if (status < 0)
|
||||
{
|
||||
if (i == TEST_SEND_NMSGS-1 && errno == ETIMEDOUT)
|
||||
|
@ -232,20 +232,20 @@ static void *receiver_thread(void *arg)
|
|||
|
||||
for (i = 0; i < TEST_RECEIVE_NMSGS; i++)
|
||||
{
|
||||
struct timespec time;
|
||||
int status = clock_gettime(CLOCK_REALTIME, &time);
|
||||
struct timespec ts;
|
||||
int status = clock_gettime(CLOCK_REALTIME, &ts);
|
||||
if (status != 0)
|
||||
{
|
||||
printf("sender_thread: ERROR clock_gettime failed\n");
|
||||
}
|
||||
time.tv_sec += 5;
|
||||
ts.tv_sec += 5;
|
||||
|
||||
/* The first TEST_SEND_NMSGS-1 send should succeed. The last
|
||||
* one should fail with errno == ETIMEDOUT
|
||||
*/
|
||||
|
||||
memset(msg_buffer, 0xaa, TEST_MSGLEN);
|
||||
nbytes = mq_timedreceive(mqfd, msg_buffer, TEST_MSGLEN, 0, &time);
|
||||
nbytes = mq_timedreceive(mqfd, msg_buffer, TEST_MSGLEN, 0, &ts);
|
||||
if (nbytes < 0)
|
||||
{
|
||||
if (i == TEST_SEND_NMSGS-1 && errno == ETIMEDOUT)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/***********************************************************************
|
||||
* examples/ostest/timedwait.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -68,7 +68,7 @@ static pthread_cond_t cond;
|
|||
|
||||
static void *thread_waiter(void *parameter)
|
||||
{
|
||||
struct timespec time;
|
||||
struct timespec ts;
|
||||
int status;
|
||||
|
||||
/* Take the mutex */
|
||||
|
@ -82,16 +82,16 @@ static void *thread_waiter(void *parameter)
|
|||
|
||||
printf("thread_waiter: Starting 5 second wait for condition\n");
|
||||
|
||||
status = clock_gettime(CLOCK_REALTIME, &time);
|
||||
status = clock_gettime(CLOCK_REALTIME, &ts);
|
||||
if (status != 0)
|
||||
{
|
||||
printf("thread_waiter: ERROR clock_gettime failed\n");
|
||||
}
|
||||
time.tv_sec += 5;
|
||||
ts.tv_sec += 5;
|
||||
|
||||
/* The wait -- no-one is ever going to awaken us */
|
||||
|
||||
status = pthread_cond_timedwait(&cond, &mutex, &time);
|
||||
status = pthread_cond_timedwait(&cond, &mutex, &ts);
|
||||
if (status != 0)
|
||||
{
|
||||
if (status == ETIMEDOUT)
|
||||
|
|
|
@ -14,6 +14,7 @@ BR2_arm=y
|
|||
# BR2_m68k is not set
|
||||
# BR2_m68hc11 is not set
|
||||
# BR2_m68hc12 is not set
|
||||
# BR2_m9s12x is not set
|
||||
# BR2_mips is not set
|
||||
# BR2_mipsel is not set
|
||||
# BR2_nios2 is not set
|
||||
|
@ -56,7 +57,7 @@ BR2_BZCAT="bzcat"
|
|||
BR2_TAR_OPTIONS=""
|
||||
BR2_DL_DIR="$(BASE_DIR)/../archives"
|
||||
BR2_STAGING_DIR="$(BUILD_DIR)/staging_dir"
|
||||
BR2_NUTTX_DIR="$(TOPDIR)/../nuttx"
|
||||
BR2_NUTTX_DIR="$(TOPDIR)/../../nuttx"
|
||||
BR2_TOPDIR_PREFIX=""
|
||||
BR2_TOPDIR_SUFFIX=""
|
||||
BR2_GNU_BUILD_SUFFIX="pc-elf"
|
||||
|
@ -71,6 +72,7 @@ BR2_GNU_TARGET_SUFFIX="elf"
|
|||
# Binutils Options
|
||||
#
|
||||
# BR2_BINUTILS_VERSION_2_17 is not set
|
||||
# BR2_BINUTILS_VERSION_2_18 is not set
|
||||
# BR2_BINUTILS_VERSION_2_19 is not set
|
||||
BR2_BINUTILS_VERSION_2_19_1=y
|
||||
BR2_BINUTILS_VERSION="2.19.1"
|
||||
|
@ -80,6 +82,7 @@ BR2_EXTRA_BINUTILS_CONFIG_OPTIONS=""
|
|||
# GCC Options
|
||||
#
|
||||
BR2_PACKAGE_GCC=y
|
||||
# BR2_GCC_VERSION_3_3_6 is not set
|
||||
# BR2_GCC_VERSION_3_4_6 is not set
|
||||
# BR2_GCC_VERSION_4_2_4 is not set
|
||||
BR2_GCC_VERSION_4_3_3=y
|
||||
|
@ -102,7 +105,8 @@ BR2_INSTALL_LIBSTDCPP=y
|
|||
#
|
||||
# NuttX Binary Support
|
||||
#
|
||||
# BR2_PACKAGE_NXFLAT is not set
|
||||
BR2_PACKAGE_NXFLAT=y
|
||||
BR2_PACKAGE_GENROMFS=y
|
||||
|
||||
#
|
||||
# Common Toolchain Options
|
||||
|
|
|
@ -1706,9 +1706,13 @@
|
|||
* configs/lpcxpresso-lpc1668/nx: Add a NX graphics configuration for the LPCXPRESO
|
||||
board.
|
||||
* graphics/nxglib/nxglib_nonintersecting.c: Fix some single bit errors in
|
||||
calculation of non-intersecting regions. This was causing an anomoaly
|
||||
calculation of non-intersecting regions. This was causing an anomaly
|
||||
in examples/nx in column 0.
|
||||
* drivers/mtd/rammtd.c: Added a RAM based MTD driver. This RAM driver simulates
|
||||
FLASH and is useful for testing purposes.
|
||||
* arch/arm/src/arm/up_head.S: Fix backward conditional compilation. This cause
|
||||
the configs/mx1ads configuration to fail to build but does not appear to affect
|
||||
any other ARM9 build.
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -177,7 +177,7 @@
|
|||
* to the base address of the section containing both.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_ARCH_LOWVECTORS
|
||||
#ifdef CONFIG_ARCH_LOWVECTORS
|
||||
.macro mksection, section, pgtable
|
||||
bic \section, \pgtable, #0x000ff000
|
||||
.endm
|
||||
|
@ -306,7 +306,6 @@ __start:
|
|||
#endif /* CONFIG_PAGING */
|
||||
#endif /* CONFIG_ARCH_ROMPGTABLE */
|
||||
|
||||
|
||||
/* The following logic will set up the ARM920/ARM926 for normal operation.
|
||||
*
|
||||
* Here we expect to have:
|
||||
|
|
|
@ -117,7 +117,7 @@ extern void imx_boardinitialize(void);
|
|||
|
||||
static inline void up_setlevel1entry(uint32_t paddr, uint32_t vaddr, uint32_t mmuflags)
|
||||
{
|
||||
uint32_t *pgtable = (uint32_t*)PGTABLE_VBASE;
|
||||
uint32_t *pgtable = (uint32_t*)PGTABLE_BASE_VADDR;
|
||||
uint32_t index = vaddr >> 20;
|
||||
|
||||
/* Save the page table entry */
|
||||
|
|
|
@ -233,19 +233,19 @@
|
|||
* We will reuse this memory for coarse page tables as follows:
|
||||
*/
|
||||
|
||||
#define PGTABLE_PBASE IMX_SDRAM0_PSECTION
|
||||
#define PGTABLE_SDRAM_PBASE PGTABLE_PBASE
|
||||
#define PGTABLE_COARSE_PBASE (PGTABLE_PBASE+0x00000800)
|
||||
#define PGTABLE_COARSE_PEND (PGTABLE_PBASE+0x00003000)
|
||||
#define PTTABLE_PERIPHERALS_PBASE (PGTABLE_PBASE+0x00003000)
|
||||
#define PGTABLE_PEND (PGTABLE_PBASE+0x00004000)
|
||||
#define PGTABLE_BASE_PADDR IMX_SDRAM0_PSECTION
|
||||
#define PGTABLE_SDRAM_PADDR PGTABLE_BASE_PADDR
|
||||
#define PGTABLE_COARSE_PBASE (PGTABLE_BASE_PADDR+0x00000800)
|
||||
#define PGTABLE_COARSE_PEND (PGTABLE_BASE_PADDR+0x00003000)
|
||||
#define PTTABLE_PERIPHERALS_PBASE (PGTABLE_BASE_PADDR+0x00003000)
|
||||
#define PGTABLE_PEND (PGTABLE_BASE_PADDR+0x00004000)
|
||||
|
||||
#define PGTABLE_VBASE IMX_SDRAM_VSECTION
|
||||
#define PGTABLE_SDRAM_VBASE PGTABLE_VBASE
|
||||
#define PGTABLE_COARSE_VBASE (PGTABLE_VBASE+0x00000800)
|
||||
#define PGTABLE_COARSE_VEND (PGTABLE_VBASE+0x00003000)
|
||||
#define PTTABLE_PERIPHERALS_VBASE (PGTABLE_VBASE+0x00003000)
|
||||
#define PGTABLE_VEND (PGTABLE_VBASE+0x00004000)
|
||||
#define PGTABLE_BASE_VADDR IMX_SDRAM_VSECTION
|
||||
#define PGTABLE_SDRAM_VADDR PGTABLE_BASE_VADDR
|
||||
#define PGTABLE_COARSE_VBASE (PGTABLE_BASE_VADDR+0x00000800)
|
||||
#define PGTABLE_COARSE_VEND (PGTABLE_BASE_VADDR+0x00003000)
|
||||
#define PTTABLE_PERIPHERALS_VBASE (PGTABLE_BASE_VADDR+0x00003000)
|
||||
#define PGTABLE_VEND (PGTABLE_BASE_VADDR+0x00004000)
|
||||
|
||||
#define PGTABLE_COARSE_TABLE_SIZE (4*256)
|
||||
#define PGTABLE_COARSE_ALLOC (PGTABLE_COARSE_VEND-PGTABLE_COARSE_VBASE)
|
||||
|
|
|
@ -44,7 +44,9 @@
|
|||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/kmalloc.h>
|
||||
#include <nuttx/ioctl.h>
|
||||
#include <nuttx/mtd.h>
|
||||
|
||||
|
@ -316,7 +318,7 @@ FAR struct mtd_dev_s *rammtd_initialize(FAR uint8_t *start, size_t size)
|
|||
|
||||
/* Create an instance of the RAM MTD device state structure */
|
||||
|
||||
priv = (FAR struct ram_dev_s *)kzmalloc(sizeof(struct ram_dev_s));
|
||||
priv = (FAR struct ram_dev_s *)kmalloc(sizeof(struct ram_dev_s));
|
||||
if (!priv)
|
||||
{
|
||||
fdbg("Failed to allocate the RAM MTD state structure\n");
|
||||
|
|
|
@ -216,6 +216,7 @@ static int fat_open(FAR struct file *filep, const char *relpath,
|
|||
if ((oflags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL))
|
||||
{
|
||||
/* Already exists -- can't create it exclusively */
|
||||
|
||||
ret = -EEXIST;
|
||||
goto errout_with_semaphore;
|
||||
}
|
||||
|
@ -251,7 +252,6 @@ static int fat_open(FAR struct file *filep, const char *relpath,
|
|||
}
|
||||
|
||||
/* fall through to finish the file open operations */
|
||||
|
||||
}
|
||||
else if (ret == -ENOENT)
|
||||
{
|
||||
|
|
|
@ -105,7 +105,7 @@ struct stat
|
|||
mode_t st_mode; /* File type, atributes, and access mode bits */
|
||||
off_t st_size; /* Size of file/directory, in bytes */
|
||||
blksize_t st_blksize; /* Blocksize used for filesystem I/O */
|
||||
blkcnt_t st_blocks; /* Number of blocks allocated*/
|
||||
blkcnt_t st_blocks; /* Number of blocks allocated */
|
||||
time_t st_atime; /* Time of last access */
|
||||
time_t st_mtime; /* Time of last modification */
|
||||
time_t st_ctime; /* Time of last status change */
|
||||
|
|
Loading…
Reference in New Issue