burn.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /**************************************************************************************************
  2. Phyplus Microelectronics Limited confidential and proprietary.
  3. All rights reserved.
  4. IMPORTANT: All rights of this software belong to Phyplus Microelectronics
  5. Limited ("Phyplus"). Your use of this Software is limited to those
  6. specific rights granted under the terms of the business contract, the
  7. confidential agreement, the non-disclosure agreement and any other forms
  8. of agreements as a customer or a partner of Phyplus. You may not use this
  9. Software unless you agree to abide by the terms of these agreements.
  10. You acknowledge that the Software may not be modified, copied,
  11. distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
  12. (BLE) integrated circuit, either as a product or is integrated into your
  13. products. Other than for the aforementioned purposes, you may not use,
  14. reproduce, copy, prepare derivative works of, modify, distribute, perform,
  15. display or sell this Software and/or its documentation for any purposes.
  16. YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
  17. PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
  18. INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
  19. NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
  20. PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
  21. NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
  22. LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
  23. INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
  24. OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
  25. OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
  26. (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
  27. **************************************************************************************************/
  28. #ifndef _BURN_H_
  29. #define _BURN_H_
  30. #include "types.h"
  31. #define M4_BIN_NUM_OFFSET 0x2000
  32. #define M4_BIN_ADDR_OFFSET(n) (M4_BIN_NUM_OFFSET+4+n*12)
  33. #define M4_BIN_SIZE_OFFSET(n) (M4_BIN_NUM_OFFSET+8+n*12)
  34. #define M4_RUN_ADDR_OFFSET(n) (M4_BIN_NUM_OFFSET+12+n*12)
  35. #define M0_BIN_NUM_OFFSET 0x2100
  36. #define M0_BIN_ADDR_OFFSET(n) (M0_BIN_NUM_OFFSET+4+n*12)
  37. #define M0_BIN_SIZE_OFFSET(n) (M0_BIN_NUM_OFFSET+8+n*12)
  38. #define M0_RUN_ADDR_OFFSET(n) (M0_BIN_NUM_OFFSET+12+n*12)
  39. #define USR_DATA_BASE 0x4000
  40. #define IMAGE_BASE_OFFSET 0x5000
  41. #define M4_BIN 1
  42. #define M0_BIN 2
  43. #define BURN_BUF_LEN 64
  44. typedef struct{
  45. uint8_t valid;
  46. uint8_t length;
  47. uint8_t data[BURN_BUF_LEN];
  48. uint8_t end;
  49. }burn_buf_st;
  50. //void handle_uart_command(void);
  51. #endif