Modify the build method of TizenRT target
Introduced a cmake/toolchain_mcu_artik053.cmake file that defines all the target specific compiler options. Modified the Makefile.tizenrt to do not copy the created static libraries to the TizenRT folder. Instead, the application builder Makefile (tizenrt-artik053/apps/jerryscript/Makefile) copies the required static libraries to TizenRT. JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.uszeged@partner.samsung.com
This commit is contained in:
@@ -21,7 +21,6 @@
|
||||
#include "jerryscript.h"
|
||||
#include "jerryscript-ext/handler.h"
|
||||
#include "jerryscript-port.h"
|
||||
#include "jmem.h"
|
||||
#include "setjmp.h"
|
||||
|
||||
#include <apps/shell/tash.h> // To register tash command
|
||||
@@ -63,7 +62,7 @@ print_help (char *name)
|
||||
/**
|
||||
* Read source code into buffer.
|
||||
*
|
||||
* Returned value must be freed with jmem_heap_free_block if it's not NULL.
|
||||
* Returned value must be freed if it's not NULL.
|
||||
* @return NULL, if read or allocation has failed
|
||||
* pointer to the allocated memory block, otherwise
|
||||
*/
|
||||
@@ -96,7 +95,7 @@ read_file (const char *file_name, /**< source code */
|
||||
|
||||
rewind (file);
|
||||
|
||||
uint8_t *buffer = jmem_heap_alloc_block_null_on_error (script_len);
|
||||
uint8_t *buffer = (uint8_t *) malloc (script_len);
|
||||
|
||||
if (buffer == NULL)
|
||||
{
|
||||
@@ -110,7 +109,7 @@ read_file (const char *file_name, /**< source code */
|
||||
if (!bytes_read || bytes_read != script_len)
|
||||
{
|
||||
jerry_port_log (JERRY_LOG_LEVEL_ERROR, "Error: failed to read file: %s\n", file_name);
|
||||
jmem_heap_free_block ((void*) buffer, script_len);
|
||||
free ((void*) buffer);
|
||||
|
||||
fclose (file);
|
||||
return NULL;
|
||||
@@ -458,12 +457,12 @@ jerry_cmd_main (int argc, char *argv[])
|
||||
if (jerry_value_has_error_flag (ret_value))
|
||||
{
|
||||
print_unhandled_exception (ret_value, source_p);
|
||||
jmem_heap_free_block ((void*) source_p, source_size);
|
||||
free ((void*) source_p);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
jmem_heap_free_block ((void*) source_p, source_size);
|
||||
free ((void*) source_p);
|
||||
|
||||
jerry_release_value (ret_value);
|
||||
ret_value = jerry_create_undefined ();
|
||||
|
||||
Reference in New Issue
Block a user