summaryrefslogtreecommitdiff
path: root/bsp/nxp/lpc/lpc54608-LPCXpresso/applications/main.c
blob: 23fe989188e3646fbac9bd77847b6cf936dfc95b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2017-08-08     Yang        the first version
 */

#include <rthw.h>
#include <rtthread.h>

#include "board.h"
#include "drv_sram.h"

void link_dump(void)
{
#ifdef __GNUC__
    extern unsigned int _sdata;
    extern unsigned int _edata;
    extern unsigned int _sidata;

    extern unsigned int _sbss;
    extern unsigned int _ebss;

    #define DUMP_VAR(__VAR) \
        rt_kprintf("%-20s %p\n", #__VAR, &__VAR)

    DUMP_VAR(_sdata);
    DUMP_VAR(_edata);
    DUMP_VAR(_sidata);
    DUMP_VAR(_sbss);
    DUMP_VAR(_ebss);
#endif
}

int main(void)
{
    rt_kprintf("Hello RT-Thread!\n");

    link_dump();

    while(1)
    {
        rt_thread_mdelay(100);
    }

    return 0;
}