/*! * @file mx6.c * * @brief Simple test program * * Created on: Jan 25, 2019 * Author: Ilko Iliev * * @note Copyright (c) Ronetix GmbH. All rights reserved. */ typedef unsigned int uint32_t; typedef unsigned long long uint64_t; /*! * @brief Simple test * * @param p - pointer to workspace * @param step - incrementing step */ static void test(uint32_t *p, int step) { *p++ = 0x12345678; *p++ = step; *p = 0; while (1) { (*p) += step; asm("nop"); } } uint32_t user_space[4] __attribute__ ((section (".user"))); /*! * @brief Main function, entry point * */ int main(void) { int step; #ifdef DEFINED_CORE0 step = 1; #elif DEFINED_CORE1 step = 2; #elif DEFINED_CORE2 step = 3; #elif DEFINED_CORE3 step = 4; #else #error "Something is wrong" #endif test(user_space, step); return 0; }