如题·············
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
/******************************************************************************
@file simple_peripheral.c
@brief This file contains the Simple Peripheral sample application for use
with the CC2650 Bluetooth Low Energy Protocol Stack.
Group: WCS, BTS
Target Device: cc2640r2
******************************************************************************
Copyright (c) 2013-2020, Texas Instruments Incorporated
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* 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.
* Neither the name of Texas Instruments Incorporated 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.
******************************************************************************
*****************************************************************************/
/*********************************************************************
* INCLUDES
*/
#include <string.h>
#include <ti/sysbios/knl/Task.h>
#include <ti/sysbios/knl/Clock.h>
#include <ti/sysbios/knl/Event.h>
#include <ti/sysbios/knl/Queue.h>
#include <ti/display/Display.h>
#if !(defined __TI_COMPILER_VERSION__)
#include <intrinsics.h>
#endif
#include <ti/drivers/utils/List.h>
#include <icall.h>
#include "util.h"
#include <bcomdef.h>
/* This Header file contains all BLE API and icall structure definition */
#include <icall_ble_api.h>
#include <devinfoservice.h>
#include <simple_gatt_profile.h>
#ifdef USE_RCOSC
#include <rcosc_calibration.h>
#endif //USE_RCOSC
#include <board.h>
#include <board_key.h>
#include <menu/two_btn_menu.h>
#include "simple_peripheral_menu.h"
#include "simple_peripheral.h"
#ifdef PTM_MODE
#include "npi_task.h" // To allow RX event registration
#include "npi_ble.h" // To enable transmission of messages to UART
#include "icall_hci_tl.h" // To allow ICall HCI Transport Layer
#endif // PTM_MODE
// Task configuration
#define OXY_TASK_PRIORITY 1
#ifndef OXY_TASK_STACK_SIZE
#define OXY_TASK_STACK_SIZE 1000
#endif
uint8_t oxyTaskStack[OXY_TASK_STACK_SIZE];
static void Oxy_taskFxn(UArg a0, UArg a1);
void Oxy_createTask(void)
{
Task_Params taskParams;
// Configure task
Task_Params_init(&taskParams);
taskParams.stack = oxyTaskStack;
taskParams.stackSize = OXY_TASK_STACK_SIZE;
taskParams.priority = OXY_TASK_PRIORITY;
Task_construct(&oxyTaskStack, Oxy_taskFxn, &taskParams, NULL);
}
static void Oxy_taskFxn(UArg a0, UArg a1)
{
for (;;)
{
Task_sleep(100*100);
}
}
我用ccs9.0,创建这么一个简单的任务跑不起来,不进断点。
下面两处宏定义都改大了1:
好多坑啊。。。。
但是我这里是减少任务栈,不是增加啊,为什么减少栈空间,程序反而正常了。