Arm lpc4370 LPCXPRESSO编程

Arm lpc4370 LPCXPRESSO编程,arm,lpc,Arm,Lpc,我有一些关于Arduino和Msp430(使用嵌入式C)的编程知识。但是,我不知道从哪里开始学习LPC4370。我有一个编程上述芯片的要求,但我没有找到任何材料来解释各种功能,可用于编程的LPC4370。LPCopen有很多代码,但我可以找到使用的各种函数的实用性。如果有人能给出一个从哪里开始的提示,那将非常有帮助。 提前感谢。我没有使用LPC 4370,但我有使用lpc2148的经验 我建议你做几件事: 从下载LPCEXPRESSO IDE 从下载LPCXPRESSO IDE指南 了解如何创建

我有一些关于Arduino和Msp430(使用嵌入式C)的编程知识。但是,我不知道从哪里开始学习LPC4370。我有一个编程上述芯片的要求,但我没有找到任何材料来解释各种功能,可用于编程的LPC4370。LPCopen有很多代码,但我可以找到使用的各种函数的实用性。如果有人能给出一个从哪里开始的提示,那将非常有帮助。
提前感谢。

我没有使用LPC 4370,但我有使用lpc2148的经验

我建议你做几件事:

  • 从下载LPCEXPRESSO IDE

  • 从下载LPCXPRESSO IDE指南

  • 了解如何创建项目。如何加载到硬件中

  • 然后学习从rtos(如FreeRTOS)创建简单任务

  • 阅读ST手册了解各种RTOS功能

    下面是创建简单任务的示例程序。你可以参考,同样地,你也可以阅读以下练习并继续

    /*
        FreeRTOS V6.1.1 - Copyright (C) 2011 Real Time Engineers Ltd.
    
        This file is part of the FreeRTOS distribution.
    
        FreeRTOS is free software; you can redistribute it and/or modify it under
        the terms of the GNU General Public License (version 2) as published by the
        Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
        ***NOTE*** The exception to the GPL is included to allow you to distribute
        a combined work that includes FreeRTOS without being obliged to provide the
        source code for proprietary components outside of the FreeRTOS kernel.
        FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
        ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
        FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
        more details. You should have received a copy of the GNU General Public
        License and the FreeRTOS license exception along with FreeRTOS; if not it
        can be viewed here: http://www.freertos.org/a00114.html and also obtained
        by writing to Richard Barry, contact details for whom are available on the
        FreeRTOS WEB site.
    
        1 tab == 4 spaces!
    
        http://www.FreeRTOS.org - Documentation, latest information, license and
        contact details.
    
        http://www.SafeRTOS.com - A version that is certified for use in safety
        critical systems.
    
        http://www.OpenRTOS.com - Commercial support, development, porting,
        licensing and training services.
    */
    
    
    
    
    #include "FreeRTOS.h"
    
    #include "task.h"
    
    
    /* Demo includes. */
    #include "basic_io.h"
    
    /* Used as a loop counter to create a very crude delay. */
    #define mainDELAY_LOOP_COUNT        ( 0xfffff )
    
    /* The task functions. */
    void vTask1( void *pvParameters );
    void vTask2( void *pvParameters );
    
    int main( void )
    {
        /* Init the semi-hosting. */
    
        printf( "\n" );
        /* Create one of the two tasks. */
        xTaskCreate(    vTask1,     /* Pointer to the function that implements the task. */
                        "Task 1",   /* Text name for the task.  This is to facilitate debugging only. */
                        240,        /* Stack depth in words. */
                        NULL,       /* We are not using the task parameter. */
                        1,          /* This task will run at priority 1. */
                        NULL );     /* We are not using the task handle. */
    
        /* Create the other task in exactly the same way. */
        xTaskCreate( vTask2, "Task 2", 240, NULL, 1, NULL );
    
        /* Start the scheduler so our tasks start executing. */
        //
    
        vTaskStartScheduler();
    
    
    
    
        for( ;; );
        return 0;
    }
    /*-----------------------------------------------------------*/
    
    void vTask1( void *pvParameters )
    {
    const char *pcTaskName = "Task 1 is running\n";
    volatile unsigned long ul;
    
        /* As per most tasks, this task is implemented in an infinite loop. */
        for( ;; )
        {
            /* Print out the name of this task. */
    
            vPrintString( pcTaskName );
    
    
            /* Delay for a period. */
            for( ul = 0; ul < mainDELAY_LOOP_COUNT; ul++ )
            {
                /* This loop is just a very crude delay implementation.  There is
                nothing to do in here.  Later exercises will replace this crude
                loop with a proper delay/sleep function. */
            }
        }
    
        //??????delete your task
    }
    
    void vTask2( void *pvParameters )
    {
    const char *pcTaskName = "Task 2 is running\n";
    volatile unsigned long ul;
    
        /* As per most tasks, this task is implemented in an infinite loop. */
        for( ;; )
        {
            /* Print out the name of this task. */
            vPrintString( pcTaskName );
    
            /* Delay for a period. */
            for( ul = 0; ul < mainDELAY_LOOP_COUNT; ul++ )
            {
                /* This loop is just a very crude delay implementation.  There is
                nothing to do in here.  Later exercises will replace this crude
                loop with a proper delay/sleep function. */
            }
        }
    }
    /*-----------------------------------------------------------*/
    void vApplicationMallocFailedHook( void )
    {
        /* This function will only be called if an API call to create a task, queue
        or semaphore fails because there is too little heap RAM remaining. */
        for( ;; );
    }
    /*-----------------------------------------------------------*/
    
    
    void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )
    {
        /* This function will only be called if a task overflows its stack.  Note
        that stack overflow checking does slow down the context switch
        implementation. */
        for( ;; );
    }
    /*-----------------------------------------------------------*/
    
    
    void vApplicationIdleHook( void )
    {
        /* This example does not use the idle hook to perform any processing. */
    }
    /*-----------------------------------------------------------*/
    
    
    void vApplicationTickHook( void )
    {
        /* This example does not use the tick hook to perform any processing. */
    }
    
    /*
    FreeRTOS V6.1.1-版权所有(C)2011实时工程师有限公司。
    此文件是FreeRTOS发行版的一部分。
    FreeRTOS是自由软件;您可以在下重新分发和/或修改它
    政府发布的GNU通用公共许可证(第2版)的条款
    自由软件基金会,并由FreRotos例外修改。
    ***注***包括GPL例外情况,以允许您分发
    包含FreeRTOS的组合工作,无需提供
    FreeRTOS内核之外的专有组件的源代码。
    FreeRTOS的发布是希望它会有用,但是没有
    任何保证;甚至没有暗示的适销性保证或
    适合某一特定目的。有关详细信息,请参阅GNU通用公共许可证
    更多细节。你应该已经收到了一份GNU普通公众版
    许可证和FreeRTOS许可证例外以及FreeRTOS;如果不是的话
    可在此处查看:http://www.freertos.org/a00114.html 也获得
    通过写信给Richard Barry,可以在
    FreeRTOS网站。
    1个制表符==4个空格!
    http://www.FreeRTOS.org -文档、最新信息、许可证和
    联系方式。
    http://www.SafeRTOS.com -经认证可安全使用的版本
    关键系统。
    http://www.OpenRTOS.com -商业支持、开发、移植,
    执照和培训服务。
    */
    #包括“FreeRTOS.h”
    #包括“task.h”
    /*演示包括*/
    #包括“基本io.h”
    /*用作循环计数器以产生非常粗糙的延迟*/
    #定义主延迟循环计数(0xfffff)
    /*任务的功能*/
    void vTask1(void*pvParameters);
    void vTask2(void*pvParameters);
    内部主(空)
    {
    /*初始化半宿主*/
    printf(“\n”);
    /*创建两个任务之一*/
    xTaskCreate(vTask1,/*指向实现任务的函数的指针*/
    “任务1”,任务的/*文本名称。这只是为了便于调试*/
    240,/*以字表示的堆栈深度*/
    NULL,/*我们没有使用任务参数*/
    1,/*此任务将以优先级1运行*/
    NULL);/*我们没有使用任务句柄*/
    /*以完全相同的方式创建其他任务*/
    xTaskCreate(vTask2,“任务2”,240,NULL,1,NULL);
    /*启动调度程序,使我们的任务开始执行*/
    //
    vTaskStartScheduler();
    对于(;);
    返回0;
    }
    /*-----------------------------------------------------------*/
    void vTask1(void*pvParameters)
    {
    const char*pcTaskName=“任务1正在运行\n”;
    易失性无符号长ul;
    /*根据大多数任务,此任务是在无限循环中实现的*/
    对于(;;)
    {
    /*打印出此任务的名称*/
    vPrintString(pcTaskName);
    /*耽搁一段时间*/
    用于(ul=0;ul
    什么